mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-29 22:27:31 +00:00
test: 新增对 BotAccount.id 字段的单元测试.
该测试有助于确保 id 能正常地从 Token 中获取.
This commit is contained in:
parent
508f14f271
commit
c5fe96c02d
@ -16,6 +16,12 @@ import kotlin.test.assertTrue
|
||||
|
||||
internal class BotAccountTest {
|
||||
|
||||
@Test
|
||||
fun `id getter`() {
|
||||
val accountId = abs(Random().nextInt()).toLong()
|
||||
assertEquals(accountId, BotAccount("Test", "${accountId}:AAHErDroUTznQsOd_oZPJ6cQEj4Z5mGHO10", 0).id)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun deserializerTest() {
|
||||
val accountId = abs(Random().nextInt()).toLong()
|
||||
|
Loading…
Reference in New Issue
Block a user