Skip to content

Commit

Permalink
Polish tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikSOffice committed Apr 26, 2020
1 parent 5cf8325 commit 1902a23
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions library/src/test/java/com/yariksoffice/lingver/LingverTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import android.content.Context
import android.content.res.Configuration
import com.yariksoffice.lingver.store.LocaleStore
import io.mockk.*
import org.junit.Assert.assertEquals
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test
import java.util.*
Expand Down Expand Up @@ -143,22 +143,22 @@ class LingverTest {
@Test
fun isFollowingSystemLocale_returnCorrectSetting() {
followSystemLocale()
assertEquals(lingver.isFollowingSystemLocale(), true)
assertTrue(lingver.isFollowingSystemLocale())

dontFollowSystemLocale()
assertEquals(lingver.isFollowingSystemLocale(), false)
assertFalse(lingver.isFollowingSystemLocale())
}

@Test
fun setup_registerActivityAndComponentCallbacks() {
fun initialize_registerActivityAndComponentCallbacks() {
lingver.initialize(application)

verify { application.registerActivityLifecycleCallbacks(any()) }
verify { application.registerComponentCallbacks(any()) }
}

@Test
fun setup_isFollowingSystemLocale_persistSystemLocale() {
fun initialize_isFollowingSystemLocale_persistSystemLocale() {
followSystemLocale()
lingver.systemLocale = SYSTEM_LOCALE

Expand All @@ -168,7 +168,7 @@ class LingverTest {
}

@Test
fun setup_isFollowingSystemLocale_applySystemLocale() {
fun initialize_isFollowingSystemLocale_applySystemLocale() {
followSystemLocale()
lingver.systemLocale = SYSTEM_LOCALE

Expand All @@ -178,7 +178,7 @@ class LingverTest {
}

@Test
fun setup_isNotFollowingSystemLocale_persistLocale() {
fun initialize_isNotFollowingSystemLocale_persistLocale() {
dontFollowSystemLocale()
returnTestLocale()

Expand All @@ -188,7 +188,7 @@ class LingverTest {
}

@Test
fun setup_isNotFollowingSystemLocale_applyLocale() {
fun initialize_isNotFollowingSystemLocale_applyLocale() {
dontFollowSystemLocale()
returnTestLocale()

Expand Down

0 comments on commit 1902a23

Please sign in to comment.