@Test public void shouldGetConfigurations() throws Exception { when(repository.getAll()).thenReturn(new ArrayList<ConfigurationSetting>()); List<ConfigurationSetting> actual = service.getConfigurations(); verify(repository).getAll(); assertEquals(actual.size(), 0); }
public List<ConfigurationSetting> getConfigurations() { return configurationSettingRepository.getAll(); }
ConfigurationSettingService { public List<ConfigurationSetting> getConfigurations() { return configurationSettingRepository.getAll(); } }
ConfigurationSettingService { public List<ConfigurationSetting> getConfigurations() { return configurationSettingRepository.getAll(); } @Autowired  ConfigurationSettingService(ConfigurationSettingRepository configurationSettingRepository); }
ConfigurationSettingService { public List<ConfigurationSetting> getConfigurations() { return configurationSettingRepository.getAll(); } @Autowired  ConfigurationSettingService(ConfigurationSettingRepository configurationSettingRepository); ConfigurationSetting getByKey(String key); int getConfigurationIntValue(String key); String getConfigurationStringValue(String key); Boolean getBoolValue(String key); List<Object> getConfigurationListValue(String key, String delimiter); List<ConfigurationSetting> getConfigurations(); void update(List<ConfigurationSetting> settings); void saveBooleanValue(String key, Boolean value); List<ConfigurationSetting> getSearchResults(String s); }
ConfigurationSettingService { public List<ConfigurationSetting> getConfigurations() { return configurationSettingRepository.getAll(); } @Autowired  ConfigurationSettingService(ConfigurationSettingRepository configurationSettingRepository); ConfigurationSetting getByKey(String key); int getConfigurationIntValue(String key); String getConfigurationStringValue(String key); Boolean getBoolValue(String key); List<Object> getConfigurationListValue(String key, String delimiter); List<ConfigurationSetting> getConfigurations(); void update(List<ConfigurationSetting> settings); void saveBooleanValue(String key, Boolean value); List<ConfigurationSetting> getSearchResults(String s);  }