mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-30 06:37:29 +00:00
test(config): 调整测试数据, 以符合该测试用例的情况.
为 BotConfig 的完整序列化测试添加 Artifact 值, 覆盖解析 BotConfig 所涉及的 Artifact 序列化.
This commit is contained in:
parent
b8a99a4491
commit
df484d6bd7
@ -480,7 +480,9 @@ internal class BotConfigSerializerTest {
|
|||||||
addProperty("disableBuiltInAbility", true)
|
addProperty("disableBuiltInAbility", true)
|
||||||
addProperty("autoUpdateCommandList", true)
|
addProperty("autoUpdateCommandList", true)
|
||||||
addProperty("baseApiUrl", "https://test.com")
|
addProperty("baseApiUrl", "https://test.com")
|
||||||
add("extensions", JsonArray())
|
add("extensions", JsonArray().apply {
|
||||||
|
add("org.example:test:1.0.0-SNAPSHOT")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
val botConfig = BotConfigSerializer.deserialize(
|
val botConfig = BotConfigSerializer.deserialize(
|
||||||
@ -496,7 +498,8 @@ internal class BotConfigSerializerTest {
|
|||||||
assertEquals(true, botConfig.disableBuiltInAbility)
|
assertEquals(true, botConfig.disableBuiltInAbility)
|
||||||
assertEquals(true, botConfig.autoUpdateCommandList)
|
assertEquals(true, botConfig.autoUpdateCommandList)
|
||||||
assertEquals("https://test.com", botConfig.baseApiUrl)
|
assertEquals("https://test.com", botConfig.baseApiUrl)
|
||||||
assertEquals(true, botConfig.extensions.isEmpty())
|
assertEquals(false, botConfig.extensions.isEmpty())
|
||||||
|
assertEquals(1, botConfig.extensions.size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user