diff --git a/opensrp-reveal/src/test/java/org/smartregister/reveal/BaseUnitTest.java b/opensrp-reveal/src/test/java/org/smartregister/reveal/BaseUnitTest.java index e61fab816b..5bf7ab3dac 100644 --- a/opensrp-reveal/src/test/java/org/smartregister/reveal/BaseUnitTest.java +++ b/opensrp-reveal/src/test/java/org/smartregister/reveal/BaseUnitTest.java @@ -15,6 +15,7 @@ import org.robolectric.annotation.Config; import org.smartregister.reveal.shadow.AsyncTaskShadow; import org.smartregister.reveal.shadow.CloudantDataHandlerShadowUtils; +import org.smartregister.reveal.shadow.CoreLibraryShadow; import org.smartregister.reveal.shadow.CredentialsHelperShadow; import org.smartregister.reveal.shadow.CustomFontTextViewShadow; import org.smartregister.reveal.shadow.GeoJsonSourceShadow; @@ -34,7 +35,7 @@ MapViewShadow.class, KujakuMapViewShadow.class, RevealMapViewShadow.class, LayerShadow.class, SymbolLayerShadow.class, LineLayerShadow.class, GeoJsonSourceShadow.class, SourceShadow.class, OfflineManagerShadow.class, - AsyncTaskShadow.class, CloudantDataHandlerShadowUtils.class, CredentialsHelperShadow.class}, sdk = Build.VERSION_CODES.P) + AsyncTaskShadow.class, CloudantDataHandlerShadowUtils.class, CoreLibraryShadow.class, CredentialsHelperShadow.class}, sdk = Build.VERSION_CODES.P) public abstract class BaseUnitTest { @Rule diff --git a/opensrp-reveal/src/test/java/org/smartregister/reveal/TestRevealApplication.java b/opensrp-reveal/src/test/java/org/smartregister/reveal/TestRevealApplication.java index aa9a2f7f6f..dabe4fb9d1 100644 --- a/opensrp-reveal/src/test/java/org/smartregister/reveal/TestRevealApplication.java +++ b/opensrp-reveal/src/test/java/org/smartregister/reveal/TestRevealApplication.java @@ -37,6 +37,7 @@ public void onCreate() { SyncConfiguration syncConfiguration = spy(new RevealSyncConfiguration()); when(syncConfiguration.runPlanEvaluationOnClientProcessing()).thenReturn(false); CoreLibrary.init(context, syncConfiguration); + ConfigurableViewsLibrary.init(context); FamilyLibrary.init(context, getMetadata(), BuildConfig.VERSION_CODE, BuildConfig.DATABASE_VERSION); diff --git a/opensrp-reveal/src/test/java/org/smartregister/reveal/shadow/CoreLibraryShadow.java b/opensrp-reveal/src/test/java/org/smartregister/reveal/shadow/CoreLibraryShadow.java new file mode 100644 index 0000000000..9428518d49 --- /dev/null +++ b/opensrp-reveal/src/test/java/org/smartregister/reveal/shadow/CoreLibraryShadow.java @@ -0,0 +1,17 @@ +package org.smartregister.reveal.shadow; + +import org.robolectric.annotation.Implementation; +import org.robolectric.annotation.Implements; +import org.smartregister.CoreLibrary; + +/** + * Created by samuelgithengi on 12/2/20. + */ +@Implements(CoreLibrary.class) +public class CoreLibraryShadow { + + @Implementation + private static void checkPlatformMigrations() { + //do nothing + } +}