MessageProtocolFacadeTest.kt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2019-2023 Mamoe Technologies and contributors.
  3. *
  4. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
  5. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
  6. *
  7. * https://github.com/mamoe/mirai/blob/dev/LICENSE
  8. */
  9. package net.mamoe.mirai.internal.message.protocol
  10. import net.mamoe.mirai.internal.test.AbstractTest
  11. import kotlin.test.Test
  12. import kotlin.test.assertEquals
  13. internal class MessageProtocolFacadeTest : AbstractTest() {
  14. @Test
  15. fun `can load`() {
  16. assertEquals(
  17. """
  18. QuoteReplyProtocol
  19. AudioProtocol
  20. CustomMessageProtocol
  21. FaceProtocol
  22. FileMessageProtocol
  23. FlashImageProtocol
  24. ImageProtocol
  25. MarketFaceProtocol
  26. SuperFaceProtocol
  27. MusicShareProtocol
  28. PokeMessageProtocol
  29. PttMessageProtocol
  30. RichMessageProtocol
  31. ShortVideoProtocol
  32. TextProtocol
  33. VipFaceProtocol
  34. ForwardMessageProtocol
  35. LongMessageProtocol
  36. IgnoredMessagesProtocol
  37. UnsupportedMessageProtocol
  38. GeneralMessageSenderProtocol
  39. """.trimIndent(),
  40. MessageProtocolFacadeImpl().loaded.joinToString("\n") { it::class.simpleName.toString() }
  41. )
  42. }
  43. }