From efb6a8372a1099c881990ec56356a433b47af090 Mon Sep 17 00:00:00 2001 From: Michelle Wong Date: Fri, 12 Jul 2019 17:22:46 -0700 Subject: [PATCH] Closes #2543: fix lint errors --- app/src/main/java/org/mozilla/tv/firefox/ext/Locale.kt | 1 - .../test/java/org/mozilla/tv/firefox/ext/LocaleKtTest.kt | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/mozilla/tv/firefox/ext/Locale.kt b/app/src/main/java/org/mozilla/tv/firefox/ext/Locale.kt index 1f6a63b60f..690cf46099 100644 --- a/app/src/main/java/org/mozilla/tv/firefox/ext/Locale.kt +++ b/app/src/main/java/org/mozilla/tv/firefox/ext/Locale.kt @@ -3,7 +3,6 @@ package org.mozilla.tv.firefox.ext import org.mozilla.tv.firefox.architecture.KillswitchLocales import java.util.Locale - /** * Returns true if the following is true for _any_ of the elements in [allowedLocales]: * 1) Language == [this] language diff --git a/app/src/test/java/org/mozilla/tv/firefox/ext/LocaleKtTest.kt b/app/src/test/java/org/mozilla/tv/firefox/ext/LocaleKtTest.kt index 183e7afde2..d0a2ef8cdb 100644 --- a/app/src/test/java/org/mozilla/tv/firefox/ext/LocaleKtTest.kt +++ b/app/src/test/java/org/mozilla/tv/firefox/ext/LocaleKtTest.kt @@ -1,10 +1,9 @@ package org.mozilla.tv.firefox.ext -import io.mockk.every -import io.mockk.mockk import io.mockk.mockkStatic import io.mockk.verify -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test import org.mozilla.tv.firefox.architecture.KillswitchLocales import java.util.* @@ -43,7 +42,7 @@ class LocaleKtTest { assertTrue(Locale.CANADA.languageAndMaybeCountryMatch(arrayOf(allowed))) } - + @Test fun `WHEN an incorrect country AND an incorrect language are passed THEN should return false`() { val allowed = Locale.GERMANY @@ -107,5 +106,4 @@ class LocaleKtTest { // Verify that languageAndMaybeCountryMatch is called with an array of locales (i.e., the overload) locales.forEach { verify(exactly = 1) { it.languageAndMaybeCountryMatch(any>()) } } } - }