[components] For https://github.com/mozilla-mobile/android-components/issues/1481. Use androidx runner in browser-domains.
This commit is contained in:
committed by
Sebastian Kaspari
parent
f9ec3e04ad
commit
b6629cd6fc
@@ -1,2 +1,2 @@
|
|||||||
# TODO remove and enable globally
|
# TODO remove and enable globally
|
||||||
android.enableUnitTestBinaryResources=true
|
android.enableUnitTestBinaryResources=true
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testOptions.unitTests.includeAndroidResources = true
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -29,9 +31,8 @@ dependencies {
|
|||||||
|
|
||||||
testImplementation project(':support-test')
|
testImplementation project(':support-test')
|
||||||
|
|
||||||
testImplementation Dependencies.testing_junit
|
testImplementation Dependencies.androidx_test_junit
|
||||||
testImplementation Dependencies.testing_robolectric
|
testImplementation Dependencies.testing_robolectric
|
||||||
testImplementation Dependencies.testing_mockito
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: '../../../publish.gradle'
|
apply from: '../../../publish.gradle'
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# TODO remove and enable globally
|
||||||
|
android.enableUnitTestBinaryResources=true
|
||||||
@@ -2,6 +2,7 @@ package mozilla.components.browser.domains
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import mozilla.components.browser.domains.autocomplete.BaseDomainAutocompleteProvider
|
import mozilla.components.browser.domains.autocomplete.BaseDomainAutocompleteProvider
|
||||||
import mozilla.components.browser.domains.autocomplete.DomainAutocompleteProvider
|
import mozilla.components.browser.domains.autocomplete.DomainAutocompleteProvider
|
||||||
@@ -14,9 +15,8 @@ import org.junit.Assert.assertNull
|
|||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
class BaseDomainAutocompleteProviderTest {
|
class BaseDomainAutocompleteProviderTest {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|||||||
@@ -5,15 +5,15 @@
|
|||||||
package mozilla.components.browser.domains
|
package mozilla.components.browser.domains
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
class CustomDomainsTest {
|
class CustomDomainsTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
package mozilla.components.browser.domains
|
package mozilla.components.browser.domains
|
||||||
|
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import mozilla.components.browser.domains.DomainAutoCompleteProvider.AutocompleteSource.CUSTOM_LIST
|
import mozilla.components.browser.domains.DomainAutoCompleteProvider.AutocompleteSource.CUSTOM_LIST
|
||||||
import mozilla.components.browser.domains.DomainAutoCompleteProvider.AutocompleteSource.DEFAULT_LIST
|
import mozilla.components.browser.domains.DomainAutoCompleteProvider.AutocompleteSource.DEFAULT_LIST
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
@@ -16,12 +17,11 @@ import org.junit.Assert.assertFalse
|
|||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* While [DomainAutoCompleteProvider] exists (even if it's deprecated) we need to test it.
|
* While [DomainAutoCompleteProvider] exists (even if it's deprecated) we need to test it.
|
||||||
*/
|
*/
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
class DomainAutoCompleteProviderTest {
|
class DomainAutoCompleteProviderTest {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
package mozilla.components.browser.domains
|
package mozilla.components.browser.domains
|
||||||
|
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
class DomainsTest {
|
class DomainsTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user