@Test public void shouldReturnAllDbProperties() { List<AnanyaReferenceDataProperty> ananyaReferenceDataProperties = Arrays.asList( new AnanyaReferenceDataProperty("syncSwitch", "on"), new AnanyaReferenceDataProperty("dummy", "dum")); when(allDbProperties.getAllProperties()).thenReturn(ananyaReferenceDataProperties); List<AnanyaReferenceDataProperty> allDbProperties = propertiesService.getAllProperties(); assertEquals(2, allDbProperties.size()); }
@Test public void shouldReturnTrueForIsSyncOnWhenSyncPropertyHasBeenSetToOn() { when(allDbProperties.getForSyncSwitch()).thenReturn("on"); assertTrue(propertiesService.isSyncOn()); }