For #27055: check whether applied wallpaper name is blank
(cherry picked from commit 414c569e86
)
pull/543/head
parent
73c4f78cf3
commit
a86bf2566a
@ -0,0 +1,28 @@
|
||||
package org.mozilla.fenix.wallpapers
|
||||
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class WallpaperTest {
|
||||
@Test
|
||||
fun `GIVEN blank wallpaper name WHEN checking whether is default THEN is default`() {
|
||||
val result = Wallpaper.nameIsDefault("")
|
||||
|
||||
assertTrue(result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `GIVEN the default wallpaper is set to be shown WHEN checking whether the current wallpaper should be default THEN return true`() {
|
||||
val result = Wallpaper.nameIsDefault("default")
|
||||
|
||||
assertTrue(result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `GIVEN a custom wallpaper is set to be shown WHEN checking whether the current wallpaper should be default THEN return false`() {
|
||||
val result = Wallpaper.nameIsDefault("wally world")
|
||||
|
||||
assertFalse(result)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue