mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-25 21:23:55 +08:00
Simple test: MockBot
This commit is contained in:
parent
e5f0adfd7e
commit
bb5c85965a
28
mirai-core/src/commonTest/kotlin/MockBot.kt
Normal file
28
mirai-core/src/commonTest/kotlin/MockBot.kt
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
|
||||
@file:Suppress("unused")
|
||||
|
||||
package net.mamoe.mirai.internal
|
||||
|
||||
import net.mamoe.mirai.utils.BotConfiguration
|
||||
|
||||
internal val MockAccount = BotAccount(1, "pwd")
|
||||
|
||||
internal val MockConfiguration = BotConfiguration {
|
||||
}
|
||||
|
||||
@Suppress("TestFunctionName")
|
||||
internal fun MockBot(conf: BotConfiguration.() -> Unit) =
|
||||
QQAndroidBot(MockAccount, MockConfiguration.copy().apply(conf))
|
||||
|
||||
@Suppress("TestFunctionName")
|
||||
internal fun MockBot() =
|
||||
QQAndroidBot(MockAccount, MockConfiguration.copy())
|
Loading…
Reference in New Issue
Block a user