@SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void getAllProjectsSecurity() { @SuppressWarnings("unchecked") List<AbstractProject> projects = Mockito.mock(List.class); doReturn(projects).when(hudson).getAllItems(AbstractProject.class); List<AbstractProject> result = getInst().getAllProjects(); assertThat(result, equalTo(projects)); Mockito.verify(hudson).getAllItems(Mockito.isA(Class.class)); }
@SuppressWarnings("rawtypes") public List<AbstractProject> getAllProjects() { return getHudson().getAllItems(AbstractProject.class); }
ProjectServiceImpl extends ServiceSupport implements ProjectService { @SuppressWarnings("rawtypes") public List<AbstractProject> getAllProjects() { return getHudson().getAllItems(AbstractProject.class); } }
ProjectServiceImpl extends ServiceSupport implements ProjectService { @SuppressWarnings("rawtypes") public List<AbstractProject> getAllProjects() { return getHudson().getAllItems(AbstractProject.class); } @Inject  ProjectServiceImpl(final SecurityService securityService); }
ProjectServiceImpl extends ServiceSupport implements ProjectService { @SuppressWarnings("rawtypes") public List<AbstractProject> getAllProjects() { return getHudson().getAllItems(AbstractProject.class); } @Inject  ProjectServiceImpl(final SecurityService securityService); AbstractProject<?, ?> getProject(final UUID id); AbstractProject<?, ?> getProject(final String projectName); AbstractProject<?, ?> getProjectByFullName(final String projectName); AbstractProject<?, ?> findProject(final UUID id); AbstractProject<?, ?> findProject(final String projectName); AbstractProject<?, ?> findProjectByFullName(final String projectName); @SuppressWarnings("rawtypes") List<AbstractProject> getAllProjects(); T copyProject(final T src, final String targetProjectName); TopLevelItem createProjectFromXML(final String projectName, final InputStream xml); boolean projectExists(final String projectName); Collection<String> getProjectNames(); }
ProjectServiceImpl extends ServiceSupport implements ProjectService { @SuppressWarnings("rawtypes") public List<AbstractProject> getAllProjects() { return getHudson().getAllItems(AbstractProject.class); } @Inject  ProjectServiceImpl(final SecurityService securityService); AbstractProject<?, ?> getProject(final UUID id); AbstractProject<?, ?> getProject(final String projectName); AbstractProject<?, ?> getProjectByFullName(final String projectName); AbstractProject<?, ?> findProject(final UUID id); AbstractProject<?, ?> findProject(final String projectName); AbstractProject<?, ?> findProjectByFullName(final String projectName); @SuppressWarnings("rawtypes") List<AbstractProject> getAllProjects(); T copyProject(final T src, final String targetProjectName); TopLevelItem createProjectFromXML(final String projectName, final InputStream xml); boolean projectExists(final String projectName); Collection<String> getProjectNames();  }