@Test public void whenChangedKeyIsProtocol_schedulesUpdates() { handler.onSettingChanged(GeneralKeys.KEY_PROTOCOL, "anything"); verify(formUpdateManager).scheduleUpdates(); }
@Override public void onSettingChanged(String changedKey, Object newValue) { propertyManager.reload(); if (changedKey.equals(KEY_FORM_UPDATE_MODE) || changedKey.equals(KEY_PERIODIC_FORM_UPDATES_CHECK) || changedKey.equals(KEY_PROTOCOL)) { formUpdateManager.scheduleUpdates(); } if (changedKey.equals(KEY_SERVER_URL)) { serverRepository.save((String) newValue); } }
CollectSettingsChangeHandler implements SettingsChangeHandler { @Override public void onSettingChanged(String changedKey, Object newValue) { propertyManager.reload(); if (changedKey.equals(KEY_FORM_UPDATE_MODE) || changedKey.equals(KEY_PERIODIC_FORM_UPDATES_CHECK) || changedKey.equals(KEY_PROTOCOL)) { formUpdateManager.scheduleUpdates(); } if (changedKey.equals(KEY_SERVER_URL)) { serverRepository.save((String) newValue); } } }
CollectSettingsChangeHandler implements SettingsChangeHandler { @Override public void onSettingChanged(String changedKey, Object newValue) { propertyManager.reload(); if (changedKey.equals(KEY_FORM_UPDATE_MODE) || changedKey.equals(KEY_PERIODIC_FORM_UPDATES_CHECK) || changedKey.equals(KEY_PROTOCOL)) { formUpdateManager.scheduleUpdates(); } if (changedKey.equals(KEY_SERVER_URL)) { serverRepository.save((String) newValue); } } CollectSettingsChangeHandler(PropertyManager propertyManager, FormUpdateManager formUpdateManager, ServerRepository serverRepository); }
CollectSettingsChangeHandler implements SettingsChangeHandler { @Override public void onSettingChanged(String changedKey, Object newValue) { propertyManager.reload(); if (changedKey.equals(KEY_FORM_UPDATE_MODE) || changedKey.equals(KEY_PERIODIC_FORM_UPDATES_CHECK) || changedKey.equals(KEY_PROTOCOL)) { formUpdateManager.scheduleUpdates(); } if (changedKey.equals(KEY_SERVER_URL)) { serverRepository.save((String) newValue); } } CollectSettingsChangeHandler(PropertyManager propertyManager, FormUpdateManager formUpdateManager, ServerRepository serverRepository); @Override void onSettingChanged(String changedKey, Object newValue); }
CollectSettingsChangeHandler implements SettingsChangeHandler { @Override public void onSettingChanged(String changedKey, Object newValue) { propertyManager.reload(); if (changedKey.equals(KEY_FORM_UPDATE_MODE) || changedKey.equals(KEY_PERIODIC_FORM_UPDATES_CHECK) || changedKey.equals(KEY_PROTOCOL)) { formUpdateManager.scheduleUpdates(); } if (changedKey.equals(KEY_SERVER_URL)) { serverRepository.save((String) newValue); } } CollectSettingsChangeHandler(PropertyManager propertyManager, FormUpdateManager formUpdateManager, ServerRepository serverRepository); @Override void onSettingChanged(String changedKey, Object newValue);  }