For #9605: remove unnecessary @RunWith(Robolectric in unit tests.

robolectric increases the run time of tests so it's important to remove
them when they're unnecessary.

Between this change and the last one, the unit test runtime was reduced
by ~10s.
fennec/production
Michael Comella 4 years ago committed by Michael Comella
parent f2acef66b5
commit 392dda5eda

@ -14,18 +14,12 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.never
import org.mockito.Mockito.spy
import org.mockito.Mockito.verify
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.TestApplication
import org.mozilla.fenix.components.metrics.Event
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(application = TestApplication::class)
class ExternalAppBrowserActivityTest {
@Test

@ -10,13 +10,6 @@ import io.mockk.mockkStatic
import io.mockk.verify
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.TestApplication
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(application = TestApplication::class)
class LogTest {

@ -15,13 +15,7 @@ import io.mockk.mockk
import io.mockk.verify
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.TestApplication
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(application = TestApplication::class)
class NavControllerTest {
private val navController: NavController = mockk(relaxed = true)

@ -11,14 +11,8 @@ import io.mockk.every
import io.mockk.mockk
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.TestApplication
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
import java.util.Locale
@RunWith(RobolectricTestRunner::class)
@Config(application = TestApplication::class)
class SupportUtilsTest {
@Test

Loading…
Cancel
Save