mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
formatting
This commit is contained in:
parent
30f5e2bb6c
commit
6a66125286
1 changed files with 10 additions and 11 deletions
|
@ -24,19 +24,18 @@ class MatrixPatternsTest {
|
|||
|
||||
@Test
|
||||
fun `given user id cases, when checking isUserId, then returns expected`() {
|
||||
val cases = listOf(
|
||||
UserIdCase("foobar", isUserId = false),
|
||||
UserIdCase("@foobar", isUserId = false),
|
||||
UserIdCase("foobar@matrix.org", isUserId = false),
|
||||
UserIdCase("@foobar: matrix.org", isUserId = false),
|
||||
UserIdCase("@foobar:matrix.org", isUserId = true),
|
||||
)
|
||||
val cases = listOf(
|
||||
UserIdCase("foobar", isUserId = false),
|
||||
UserIdCase("@foobar", isUserId = false),
|
||||
UserIdCase("foobar@matrix.org", isUserId = false),
|
||||
UserIdCase("@foobar: matrix.org", isUserId = false),
|
||||
UserIdCase("@foobar:matrix.org", isUserId = true),
|
||||
)
|
||||
|
||||
cases.forEach { (input, expected) ->
|
||||
MatrixPatterns.isUserId(input) shouldBeEqualTo expected
|
||||
}
|
||||
cases.forEach { (input, expected) ->
|
||||
MatrixPatterns.isUserId(input) shouldBeEqualTo expected
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private data class UserIdCase(val input: String, val isUserId: Boolean)
|
||||
|
|
Loading…
Reference in a new issue