Skip to content

Commit

Permalink
Increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-vd committed Apr 27, 2023
1 parent a41f971 commit 888e1da
Showing 1 changed file with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@
import java.util.List;

import static android.os.Looper.getMainLooper;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anySet;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
Expand Down Expand Up @@ -151,4 +155,55 @@ public void testProcessServerConfigsShouldPopulateServerConfigsIfSettingPresent(

assertFalse(EusmApplication.getInstance().getServerConfigs().isEmpty());
}

@Test
public void testGetResolveLocationTimeoutInSecondsShouldReturnZero() {
assertEquals(0, appTaskingLibraryConfiguration.getResolveLocationTimeoutInSeconds());
}

@Test
public void testIsFocusInvestigationShouldReturnFalse() {
assertFalse(appTaskingLibraryConfiguration.isFocusInvestigation());
}

@Test
public void testIsMDAShouldReturnFalse() {
assertFalse(appTaskingLibraryConfiguration.isMDA());
}

@Test
public void testDisplayDistanceScaleShouldReturnFalse() {
assertFalse(appTaskingLibraryConfiguration.displayDistanceScale());
}

@Test
public void testResetTaskInfoShouldReturnFalse() {
assertFalse(appTaskingLibraryConfiguration.resetTaskInfo(any(), any()));
}

@Test
public void testArchiveClientShouldReturnFalse() {
assertFalse(appTaskingLibraryConfiguration.archiveClient(anyString(), anyBoolean()));
}

@Test
public void testTaskRegisterMainColumnsSHouldReturnEmptyStringArray() {
assertArrayEquals(new String[0], appTaskingLibraryConfiguration.taskRegisterMainColumns(anyString()));
}

@Test
public void testCalculateBusinessStatusShouldReturnNull() {
assertNull(appTaskingLibraryConfiguration.calculateBusinessStatus(any()));
}

@Test
public void testIsMyLocationComponentEnabledShouldReturnTrue() {
assertTrue(appTaskingLibraryConfiguration.isMyLocationComponentEnabled());
}

@Test
public void testGetCurrentPlanIdShouldReturnNull() {
assertNull(appTaskingLibraryConfiguration.getCurrentPlanId());
}

}

0 comments on commit 888e1da

Please sign in to comment.