@Test public void should_extract_version_in_jenkins_page() throws IOException { Class<? extends JenkinsVersionExtractorTest> clazz = this.getClass(); ClassLoader classLoader = clazz.getClassLoader(); InputStream stream = classLoader.getResourceAsStream("jenkins_version_page.html"); byte[] data = ByteStreams.toByteArray(stream); JenkinsVersionExtractor jve = new JenkinsVersionExtractor(new String(data)); String version = jve.version(); assertEquals("1.407", version); }
String version() { String right = content.split("Jenkins ver\\.")[1].trim(); String version = right.split("<")[0]; return version; }
JenkinsVersionExtractor { String version() { String right = content.split("Jenkins ver\\.")[1].trim(); String version = right.split("<")[0]; return version; } }
JenkinsVersionExtractor { String version() { String right = content.split("Jenkins ver\\.")[1].trim(); String version = right.split("<")[0]; return version; } JenkinsVersionExtractor(String content); }
JenkinsVersionExtractor { String version() { String right = content.split("Jenkins ver\\.")[1].trim(); String version = right.split("<")[0]; return version; } JenkinsVersionExtractor(String content);  }
JenkinsVersionExtractor { String version() { String right = content.split("Jenkins ver\\.")[1].trim(); String version = right.split("<")[0]; return version; } JenkinsVersionExtractor(String content);   }