mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Fix TestCommand deprecated warning
This commit is contained in:
parent
8f39f42e56
commit
ba91731576
@ -27,8 +27,8 @@ import net.mamoe.mirai.console.command.description.CommandArgumentParser
|
|||||||
import net.mamoe.mirai.console.initTestEnvironment
|
import net.mamoe.mirai.console.initTestEnvironment
|
||||||
import net.mamoe.mirai.console.internal.command.flattenCommandComponents
|
import net.mamoe.mirai.console.internal.command.flattenCommandComponents
|
||||||
import net.mamoe.mirai.message.data.Image
|
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.SingleMessage
|
||||||
import net.mamoe.mirai.message.data.toMessage
|
|
||||||
import org.junit.jupiter.api.AfterAll
|
import org.junit.jupiter.api.AfterAll
|
||||||
import org.junit.jupiter.api.BeforeAll
|
import org.junit.jupiter.api.BeforeAll
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
@ -107,7 +107,7 @@ internal class TestCommand {
|
|||||||
@Test
|
@Test
|
||||||
fun testSimpleArgsSplitting() = runBlocking {
|
fun testSimpleArgsSplitting() = runBlocking {
|
||||||
assertEquals(arrayOf("test", "ttt", "tt").contentToString(), withTesting<Array<String>> {
|
assertEquals(arrayOf("test", "ttt", "tt").contentToString(), withTesting<Array<String>> {
|
||||||
TestSimpleCommand.execute(sender, "test ttt tt".toMessage())
|
TestSimpleCommand.execute(sender, PlainText("test ttt tt"))
|
||||||
}.contentToString())
|
}.contentToString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user