@Test public void shouldSaveAndReadWithEmptyPropertyValue() throws Exception { SonarProject sonarConfiguration = sonarProjectManager.readSonarConfiguration(project); sonarConfiguration.getExtraProperties().add(new SonarProperty("sonar.foo", "")); sonarProjectManager.saveSonarConfiguration(project, sonarConfiguration); // Reload sonarConfiguration = sonarProjectManager.readSonarConfiguration(project); assertThat(sonarConfiguration.getExtraProperties()) .extracting("name", "value") .contains(tuple("sonar.foo", "")); }
@Test public void shouldSaveAndRead() throws Exception { SonarProject sonarConfiguration = sonarProjectManager.readSonarConfiguration(project); new SonarProjectManager().saveSonarConfiguration(project, sonarConfiguration); }