@Test public void should_get_description() throws Exception { when(hudson.getDescription("projectName")).thenReturn("description"); SoftwareProjectId softwareProjectId = new SoftwareProjectId("projectName"); String description = jenkinsConnection.getDescription(softwareProjectId); assertEquals("description", description); }
@Override public String getDescription(SoftwareProjectId projectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(projectId); try { String jobName = jobName(projectId); return hudson.getDescription(jobName); } catch (HudsonJobNotFoundException e) { throw new ProjectNotFoundException("Can't find description of project id: " + projectId, e); } }
JenkinsConnection implements BuildCapability, ViewCapability, TestCapability { @Override public String getDescription(SoftwareProjectId projectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(projectId); try { String jobName = jobName(projectId); return hudson.getDescription(jobName); } catch (HudsonJobNotFoundException e) { throw new ProjectNotFoundException("Can't find description of project id: " + projectId, e); } } }
JenkinsConnection implements BuildCapability, ViewCapability, TestCapability { @Override public String getDescription(SoftwareProjectId projectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(projectId); try { String jobName = jobName(projectId); return hudson.getDescription(jobName); } catch (HudsonJobNotFoundException e) { throw new ProjectNotFoundException("Can't find description of project id: " + projectId, e); } }  }
JenkinsConnection implements BuildCapability, ViewCapability, TestCapability { @Override public String getDescription(SoftwareProjectId projectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(projectId); try { String jobName = jobName(projectId); return hudson.getDescription(jobName); } catch (HudsonJobNotFoundException e) { throw new ProjectNotFoundException("Can't find description of project id: " + projectId, e); } }  @Override void connect(String url, String login, String password); @Override Map<SoftwareProjectId, String> listSoftwareProjectIds(); @Override Date getEstimatedFinishTime(SoftwareProjectId projectId, String buildId); @Override boolean isBuilding(SoftwareProjectId projectId, String buildId); @Override BuildState getBuildState(SoftwareProjectId projectId, String buildId); @Override String getLastBuildId(SoftwareProjectId projectId); @Override List<String> findViews(); @Override List<String> findProjectNamesByView(String viewName); @Override List<SoftwareProjectId> findSoftwareProjectIdsByViews(List<String> views); @Override void close(); @Override String getDescription(SoftwareProjectId projectId); @Override SoftwareProjectId identify(ProjectKey projectKey); @Override List<String> getBuildIds(SoftwareProjectId softwareProjectId); @Override String getMavenId(SoftwareProjectId softwareProjectId); @Override String getName(SoftwareProjectId softwareProjectId); @Override BuildTime getBuildTime(SoftwareProjectId softwareProjectId, String buildId); @Override boolean isClosed(); @Override boolean isProjectDisabled(SoftwareProjectId softwareProjectId); @Override List<Commiter> getBuildCommiters(SoftwareProjectId softwareProjectId, String buildId); @Override TestResult analyzeUnitTests(SoftwareProjectId softwareProjectId); @Override TestResult analyzeIntegrationTests(SoftwareProjectId softwareProjectId); }
JenkinsConnection implements BuildCapability, ViewCapability, TestCapability { @Override public String getDescription(SoftwareProjectId projectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(projectId); try { String jobName = jobName(projectId); return hudson.getDescription(jobName); } catch (HudsonJobNotFoundException e) { throw new ProjectNotFoundException("Can't find description of project id: " + projectId, e); } }  @Override void connect(String url, String login, String password); @Override Map<SoftwareProjectId, String> listSoftwareProjectIds(); @Override Date getEstimatedFinishTime(SoftwareProjectId projectId, String buildId); @Override boolean isBuilding(SoftwareProjectId projectId, String buildId); @Override BuildState getBuildState(SoftwareProjectId projectId, String buildId); @Override String getLastBuildId(SoftwareProjectId projectId); @Override List<String> findViews(); @Override List<String> findProjectNamesByView(String viewName); @Override List<SoftwareProjectId> findSoftwareProjectIdsByViews(List<String> views); @Override void close(); @Override String getDescription(SoftwareProjectId projectId); @Override SoftwareProjectId identify(ProjectKey projectKey); @Override List<String> getBuildIds(SoftwareProjectId softwareProjectId); @Override String getMavenId(SoftwareProjectId softwareProjectId); @Override String getName(SoftwareProjectId softwareProjectId); @Override BuildTime getBuildTime(SoftwareProjectId softwareProjectId, String buildId); @Override boolean isClosed(); @Override boolean isProjectDisabled(SoftwareProjectId softwareProjectId); @Override List<Commiter> getBuildCommiters(SoftwareProjectId softwareProjectId, String buildId); @Override TestResult analyzeUnitTests(SoftwareProjectId softwareProjectId); @Override TestResult analyzeIntegrationTests(SoftwareProjectId softwareProjectId);  }