mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-07-01 12:57:24 +00:00
test(config): 统一 Test 注解的使用, 修改测试代码的顺序.
Test 注解将统一使用 kotlin.test.Test, 这么做可以保持兼容性; 将 MavenRepositoryConfigSerializerTest.`json primitive deserialize test` 中的两段代码顺序调整一下, 以避免出现歧义.
This commit is contained in:
@ -17,7 +17,7 @@ import kotlin.test.*
|
||||
|
||||
internal class BotAccountTest {
|
||||
|
||||
@org.junit.jupiter.api.Test
|
||||
@Test
|
||||
fun `id getter`() {
|
||||
val accountId = abs(Random().nextInt()).toLong()
|
||||
Assertions.assertEquals(accountId, BotAccount("Test", "${accountId}:AAHErDroUTznQsOd_oZPJ6cQEj4Z5mGHO10", 0).id)
|
||||
@ -26,7 +26,7 @@ internal class BotAccountTest {
|
||||
private val gson = GsonBuilder()
|
||||
.create()
|
||||
|
||||
@org.junit.jupiter.api.Test
|
||||
@Test
|
||||
fun deserializerTest() {
|
||||
val accountId = abs(Random().nextInt()).toLong()
|
||||
val creatorId = abs(Random().nextInt()).toLong()
|
||||
@ -46,7 +46,7 @@ internal class BotAccountTest {
|
||||
assertEquals("${accountId}:AAHErDroUTznQsOd_oZPJ6cQEj4Z5mGHO10", botAccount.token)
|
||||
}
|
||||
|
||||
@org.junit.jupiter.api.Test
|
||||
@Test
|
||||
fun serializerTest() {
|
||||
val accountId = abs(Random().nextInt()).toLong()
|
||||
val creatorId = abs(Random().nextInt()).toLong()
|
||||
|
Reference in New Issue
Block a user