Skip to content

Commit

Permalink
Update broken build
Browse files Browse the repository at this point in the history
  • Loading branch information
githengi committed Dec 2, 2020
1 parent ba2d5ef commit aec33d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@

import org.smartregister.Context;
import org.smartregister.CoreLibrary;
import org.smartregister.SyncConfiguration;
import org.smartregister.configurableviews.ConfigurableViewsLibrary;
import org.smartregister.family.FamilyLibrary;
import org.smartregister.receiver.ValidateAssignmentReceiver;
import org.smartregister.repository.Repository;
import org.smartregister.reveal.application.RevealApplication;
import org.smartregister.reveal.util.AppExecutors;
import org.smartregister.reveal.util.RevealSyncConfiguration;

import java.util.concurrent.Executors;

import io.ona.kujaku.data.realm.RealmDatabase;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;


Expand All @@ -30,7 +33,9 @@ public void onCreate() {
mInstance = this;
context = Context.getInstance();
context.updateApplicationContext(getApplicationContext());
CoreLibrary.init(context);
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.smartregister.domain.Task;
import org.smartregister.domain.db.EventClient;
import org.smartregister.family.util.Constants;
import org.smartregister.repository.BaseRepository;
import org.smartregister.repository.EventClientRepository;
import org.smartregister.repository.StructureRepository;
import org.smartregister.repository.TaskRepository;
Expand Down Expand Up @@ -169,7 +168,7 @@ public void testFetchFamilyDetails() {
public void testSavePaotForm() throws JSONException {
Cache<Location> cache = mock(Cache.class);
when(cache.get(anyString(), any())).thenReturn(mock(Location.class));
Whitebox.setInternalState(Utils.class, cache);
Whitebox.setInternalState(Utils.class, "cache", cache);
String form = AssetHandler.readFileFromAssetsFolder(org.smartregister.reveal.util.Constants.JsonForm.PAOT_FORM, context);
JSONObject formObject = new JSONObject(form);
String structureId = UUID.randomUUID().toString();
Expand Down

0 comments on commit aec33d3

Please sign in to comment.