mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35: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
|
@Test
|
||||||
fun `given user id cases, when checking isUserId, then returns expected`() {
|
fun `given user id cases, when checking isUserId, then returns expected`() {
|
||||||
val cases = listOf(
|
val cases = listOf(
|
||||||
UserIdCase("foobar", isUserId = false),
|
UserIdCase("foobar", isUserId = false),
|
||||||
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 = false),
|
UserIdCase("@foobar: matrix.org", isUserId = false),
|
||||||
UserIdCase("@foobar:matrix.org", isUserId = true),
|
UserIdCase("@foobar:matrix.org", isUserId = true),
|
||||||
)
|
)
|
||||||
|
|
||||||
cases.forEach { (input, expected) ->
|
cases.forEach { (input, expected) ->
|
||||||
MatrixPatterns.isUserId(input) shouldBeEqualTo expected
|
MatrixPatterns.isUserId(input) shouldBeEqualTo expected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private data class UserIdCase(val input: String, val isUserId: Boolean)
|
private data class UserIdCase(val input: String, val isUserId: Boolean)
|
||||||
|
|
Loading…
Reference in a new issue