Commit 06be1d3c authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update UserAvatarHelperTest.kt

parent 1795b974
import chat.rocket.android.widget.helper.UserAvatarHelper import chat.rocket.android.widget.helper.UserAvatarHelper
import org.junit.Test import org.junit.Test
import kotlin.test.assertEquals
class UserAvatarHelperTest { class UserAvatarHelperTest {
@Test @Test
fun getUsernameInitialsTest() { fun getUsernameInitialsTest() {
assert(UserAvatarHelper.getUsernameInitials("") == "?") assertEquals("?", UserAvatarHelper.getUsernameInitials(""))
assert(UserAvatarHelper.getUsernameInitials("?") == "?") assertEquals("?", UserAvatarHelper.getUsernameInitials("?"))
assert(UserAvatarHelper.getUsernameInitials("f") == "F") assertEquals("F", UserAvatarHelper.getUsernameInitials("f"))
assert(UserAvatarHelper.getUsernameInitials("B") == "B") assertEquals("B", UserAvatarHelper.getUsernameInitials("B"))
assert(UserAvatarHelper.getUsernameInitials("fo") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("Fo"))
assert(UserAvatarHelper.getUsernameInitials("FO") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("FO"))
assert(UserAvatarHelper.getUsernameInitials("fOo") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("fOo"))
assert(UserAvatarHelper.getUsernameInitials("FOO") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("FOO"))
assert(UserAvatarHelper.getUsernameInitials("F.O") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("F.O"))
assert(UserAvatarHelper.getUsernameInitials("F.o") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("F.o"))
assert(UserAvatarHelper.getUsernameInitials("Foo.bar") == "FB") assertEquals("FB", UserAvatarHelper.getUsernameInitials("Foo.bar"))
assert(UserAvatarHelper.getUsernameInitials("Foobar.bar") == "FB") assertEquals("FB", UserAvatarHelper.getUsernameInitials("Foobar.bar"))
assert(UserAvatarHelper.getUsernameInitials("Foobar.bar.zab") == "FZ") assertEquals("FZ", UserAvatarHelper.getUsernameInitials("Foobar.bar.zab"))
assert(UserAvatarHelper.getUsernameInitials("..") == "..") assertEquals("..", UserAvatarHelper.getUsernameInitials(".."))
assert(UserAvatarHelper.getUsernameInitials("...") == "..") assertEquals("..", UserAvatarHelper.getUsernameInitials("..."))
assert(UserAvatarHelper.getUsernameInitials(".Foo.") == ".F") assertEquals(".F", UserAvatarHelper.getUsernameInitials(".Foo."))
assert(UserAvatarHelper.getUsernameInitials("Foo..") == "FO") assertEquals("FO", UserAvatarHelper.getUsernameInitials("Foo.."))
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment