@Test public void getSimpleJobUrl() { JenkinsJob test = jenkinsClient.getJob("test"); assertEquals("test", test.getName()); assertEquals("http: }
@Override public JenkinsJob getJob(String job) { String path = job.replaceAll("/job/", "/").replaceAll("/", "/job/"); String jobPath = jsonClient.getUrl("job/%s", path); String jobName = StringUtils.substringAfterLast(jobPath, "/"); return new JenkinsJob( jobName, jobPath ); }
DefaultJenkinsClient implements JenkinsClient { @Override public JenkinsJob getJob(String job) { String path = job.replaceAll("/job/", "/").replaceAll("/", "/job/"); String jobPath = jsonClient.getUrl("job/%s", path); String jobName = StringUtils.substringAfterLast(jobPath, "/"); return new JenkinsJob( jobName, jobPath ); } }
DefaultJenkinsClient implements JenkinsClient { @Override public JenkinsJob getJob(String job) { String path = job.replaceAll("/job/", "/").replaceAll("/", "/job/"); String jobPath = jsonClient.getUrl("job/%s", path); String jobName = StringUtils.substringAfterLast(jobPath, "/"); return new JenkinsJob( jobName, jobPath ); } DefaultJenkinsClient(JsonClient jsonClient); }
DefaultJenkinsClient implements JenkinsClient { @Override public JenkinsJob getJob(String job) { String path = job.replaceAll("/job/", "/").replaceAll("/", "/job/"); String jobPath = jsonClient.getUrl("job/%s", path); String jobName = StringUtils.substringAfterLast(jobPath, "/"); return new JenkinsJob( jobName, jobPath ); } DefaultJenkinsClient(JsonClient jsonClient); @Override JenkinsJob getJob(String job); @Override JenkinsInfo getInfo(); }
DefaultJenkinsClient implements JenkinsClient { @Override public JenkinsJob getJob(String job) { String path = job.replaceAll("/job/", "/").replaceAll("/", "/job/"); String jobPath = jsonClient.getUrl("job/%s", path); String jobName = StringUtils.substringAfterLast(jobPath, "/"); return new JenkinsJob( jobName, jobPath ); } DefaultJenkinsClient(JsonClient jsonClient); @Override JenkinsJob getJob(String job); @Override JenkinsInfo getInfo();  }