Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
faidvd committed Apr 19, 2021
1 parent 41becf5 commit 358dd8b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;

/**
Expand Down Expand Up @@ -85,6 +86,13 @@ public void getLocationSyncFilterValue() {
Whitebox.setInternalState(BuildConfig.class, BuildConfig.BUILD_COUNTRY, buildCountry);
}

@Test
public void testGetSettingsSyncFilterValue() {
when(allSharedPreferences.fetchRegisteredANM()).thenReturn("122132");
when(allSharedPreferences.fetchDefaultTeamId(anyString())).thenReturn("122132");
assertEquals("122132", syncConfiguration.getSettingsSyncFilterValue());
}

@Test
public void getUniqueIdSource() {
assertEquals(BuildConfig.OPENMRS_UNIQUE_ID_SOURCE, syncConfiguration.getUniqueIdSource());
Expand Down

0 comments on commit 358dd8b

Please sign in to comment.