@Test public void shouldGetAll() throws Exception { List<ConfigurationSetting> expectedConfigSettings = new ArrayList<ConfigurationSetting>(); expectedConfigSettings.add(new ConfigurationSetting()); when(mapper.getAll()).thenReturn(expectedConfigSettings); List<ConfigurationSetting> actualSettings = repository.getAll(); verify(mapper).getAll(); assertEquals(expectedConfigSettings.size(), actualSettings.size()); }
public List<ConfigurationSetting> getAll() { return mapper.getAll(); }
ConfigurationSettingRepository { public List<ConfigurationSetting> getAll() { return mapper.getAll(); } }
ConfigurationSettingRepository { public List<ConfigurationSetting> getAll() { return mapper.getAll(); } @Autowired  ConfigurationSettingRepository(ConfigurationSettingMapper configurationSettingMapper); }
ConfigurationSettingRepository { public List<ConfigurationSetting> getAll() { return mapper.getAll(); } @Autowired  ConfigurationSettingRepository(ConfigurationSettingMapper configurationSettingMapper); ConfigurationSetting getByKey(String key); List<ConfigurationSetting> getAll(); void setValue(ConfigurationSetting config); List<ConfigurationSetting> getSearchResults(String s); }
ConfigurationSettingRepository { public List<ConfigurationSetting> getAll() { return mapper.getAll(); } @Autowired  ConfigurationSettingRepository(ConfigurationSettingMapper configurationSettingMapper); ConfigurationSetting getByKey(String key); List<ConfigurationSetting> getAll(); void setValue(ConfigurationSetting config); List<ConfigurationSetting> getSearchResults(String s);  }