From a5c7252d49d0ffbe2bf8c71fa3fa0050f6a583c7 Mon Sep 17 00:00:00 2001 From: Martin Ndegwa Date: Fri, 16 Aug 2024 12:40:25 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20unit=20test=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fhircore/geowidget/screens/GeoWidgetViewModelTest.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/android/geowidget/src/test/java/org/smartregister/fhircore/geowidget/screens/GeoWidgetViewModelTest.kt b/android/geowidget/src/test/java/org/smartregister/fhircore/geowidget/screens/GeoWidgetViewModelTest.kt index b84dcd5928f..baaf1e49cdb 100644 --- a/android/geowidget/src/test/java/org/smartregister/fhircore/geowidget/screens/GeoWidgetViewModelTest.kt +++ b/android/geowidget/src/test/java/org/smartregister/fhircore/geowidget/screens/GeoWidgetViewModelTest.kt @@ -48,7 +48,6 @@ import org.smartregister.fhircore.engine.util.fhirpath.FhirPathDataExtractor import org.smartregister.fhircore.geowidget.model.GeoJsonFeature import org.smartregister.fhircore.geowidget.model.Geometry import org.smartregister.fhircore.geowidget.model.ServicePointType -import org.smartregister.fhircore.geowidget.rule.CoroutineTestRule @RunWith(RobolectricTestRunner::class) @Config(sdk = [Build.VERSION_CODES.O_MR1], application = HiltTestApplication::class) @@ -59,8 +58,6 @@ class GeoWidgetViewModelTest { @get:Rule(order = 1) var instantTaskExecutorRule = InstantTaskExecutorRule() - @get:Rule(order = 2) var coroutinesTestRule = CoroutineTestRule() - @Inject lateinit var configService: ConfigService private lateinit var configurationRegistry: ConfigurationRegistry @@ -93,7 +90,6 @@ class GeoWidgetViewModelTest { spyk( DefaultRepository( fhirEngine = fhirEngine, - dispatcherProvider = coroutinesTestRule.testDispatcherProvider, sharedPreferencesHelper = sharedPreferencesHelper, configurationRegistry = configurationRegistry, configService = configService, @@ -103,7 +99,7 @@ class GeoWidgetViewModelTest { context = ApplicationProvider.getApplicationContext(), ), ) - geoWidgetViewModel = spyk(GeoWidgetViewModel(coroutinesTestRule.testDispatcherProvider)) + geoWidgetViewModel = spyk(GeoWidgetViewModel(dispatcherProvider)) coEvery { defaultRepository.create(any()) } returns emptyList() }