use of com.thoughtworks.go.server.domain.PluginSettings in project gocd by gocd.
the class PluginServiceTest method shouldUpdatePluginSettingsToDBIfItExists.
@Test
public void shouldUpdatePluginSettingsToDBIfItExists() {
Map<String, String> parameterMap = new HashMap<>();
parameterMap.put("p1-k1", "v1");
parameterMap.put("p1-k2", "v2");
parameterMap.put("p1-k3", null);
PluginSettings pluginSettings = new PluginSettings("plugin-id-1");
pluginSettings.populateSettingsMap(parameterMap);
pluginService.savePluginSettingsFor(pluginSettings);
Plugin plugin = new Plugin("plugin-id-1", toJSON(parameterMap));
plugin.setId(1L);
verify(pluginDao).saveOrUpdate(plugin);
}
Aggregations