Skip to content

Commit

Permalink
feat: 単体テストを追加した
Browse files Browse the repository at this point in the history
  • Loading branch information
pantasystem committed Jan 9, 2024
1 parent 71b5f92 commit c7879df
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.pantasystem.milktea.model.nodeinfo

import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

internal class NodeInfoTest {
Expand Down Expand Up @@ -100,4 +100,20 @@ internal class NodeInfoTest {
nodeInfo.type
)
}

@Test
fun type_GiveKmyblue() {
val nodeInfo = NodeInfo(
version = "2.0",
host = "example.com",
software = NodeInfo.Software(
name = "kmyblue",
version = "3.0"
)
)
assertEquals(
NodeInfo.SoftwareType.Mastodon.Kmyblue("kmyblue", "3.0"),
nodeInfo.type
)
}
}

0 comments on commit c7879df

Please sign in to comment.