Add settings copy unit coverage
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package se.ajpanton.notificationlog.settings
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNotSame
|
||||
import org.junit.Test
|
||||
|
||||
class LoggingRuleCopyTest {
|
||||
@Test fun `copy retains every rule field and owns its selected-package set`() {
|
||||
val source = LoggingRule(false, AppRuleMode.WHITELIST, setOf("example.app"), true, false, false)
|
||||
val target = source.copyForTarget()
|
||||
|
||||
assertEquals(source, target)
|
||||
assertNotSame(source.selectedPackages, target.selectedPackages)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user