Skip to content

Commit

Permalink
cleaningIsOnlyApplyedToSinglePrefClass
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinMoskala committed Apr 21, 2017
1 parent c2d798b commit 076549f
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -6,6 +6,7 @@ import com.marcinmoskala.kotlinpreferences.TestPreferences.experience
import com.marcinmoskala.kotlinpreferences.TestPreferences.isMonsterKiller
import com.marcinmoskala.kotlinpreferences.TestPreferences.monstersKilled
import com.marcinmoskala.kotlinpreferences.TestPreferences.numberOfHahaInLough
import com.marcinmoskala.kotlinpreferences.collections.CollectionsPref
import org.junit.Assert
import org.junit.Assert.assertEquals
import org.junit.Test
Expand Down Expand Up @@ -43,4 +44,13 @@ class CleaningTest: BaseTest() {
assertEquals(null, experience)
assertEquals(null, className)
}

@Test
fun cleaningIsOnlyApplyedToSinglePrefClass() {
TestPreferences.isMonsterKiller = false
TestPreferences.monstersKilled = 1000
CollectionsPref.clear()
assertEquals(false, isMonsterKiller)
assertEquals(1000, monstersKilled)
}
}

0 comments on commit 076549f

Please sign in to comment.