From ba91731576462d8f843c664076ccec11929177f3 Mon Sep 17 00:00:00 2001 From: PeratX <1215714524@qq.com> Date: Thu, 20 Aug 2020 12:26:13 +0800 Subject: [PATCH] Fix TestCommand deprecated warning --- .../kotlin/net/mamoe/mirai/console/command/TestCommand.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/TestCommand.kt b/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/TestCommand.kt index c7098afa3..aa1d1f0c1 100644 --- a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/TestCommand.kt +++ b/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/TestCommand.kt @@ -27,8 +27,8 @@ import net.mamoe.mirai.console.command.description.CommandArgumentParser import net.mamoe.mirai.console.initTestEnvironment import net.mamoe.mirai.console.internal.command.flattenCommandComponents import net.mamoe.mirai.message.data.Image +import net.mamoe.mirai.message.data.PlainText import net.mamoe.mirai.message.data.SingleMessage -import net.mamoe.mirai.message.data.toMessage import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.Test @@ -107,7 +107,7 @@ internal class TestCommand { @Test fun testSimpleArgsSplitting() = runBlocking { assertEquals(arrayOf("test", "ttt", "tt").contentToString(), withTesting> { - TestSimpleCommand.execute(sender, "test ttt tt".toMessage()) + TestSimpleCommand.execute(sender, PlainText("test ttt tt")) }.contentToString()) }