@Test public void should_extract_version_from_sonar_properties() { InputStream stream = classLoader.getResourceAsStream("sonar_version_page.xml"); String version = sve.propertiesVersion(loadProperties(stream)); assertEquals("2.8", version); }
public String propertiesVersion(Properties properties) { for (Property property : properties.getProperties()) { if (property.isKey(SONAR_CORE_VERSION_KEY)) { return property.getValue(); } } return "unknown"; }
SonarVersionExtractor { public String propertiesVersion(Properties properties) { for (Property property : properties.getProperties()) { if (property.isKey(SONAR_CORE_VERSION_KEY)) { return property.getValue(); } } return "unknown"; } }
SonarVersionExtractor { public String propertiesVersion(Properties properties) { for (Property property : properties.getProperties()) { if (property.isKey(SONAR_CORE_VERSION_KEY)) { return property.getValue(); } } return "unknown"; }  }
SonarVersionExtractor { public String propertiesVersion(Properties properties) { for (Property property : properties.getProperties()) { if (property.isKey(SONAR_CORE_VERSION_KEY)) { return property.getValue(); } } return "unknown"; }  String propertiesVersion(Properties properties); String welcomePageVersion(URL url); }
SonarVersionExtractor { public String propertiesVersion(Properties properties) { for (Property property : properties.getProperties()) { if (property.isKey(SONAR_CORE_VERSION_KEY)) { return property.getValue(); } } return "unknown"; }  String propertiesVersion(Properties properties); String welcomePageVersion(URL url);  }