Package uk.ac.osswatch.simal.service

Examples of uk.ac.osswatch.simal.service.IProjectService


   
    @Test
    public void testGetReviewsForProject() throws SimalRepositoryException {
    IReviewService service = SimalRepositoryFactory.getReviewService();
    IProjectService projectService = SimalRepositoryFactory.getProjectService();
    Set<IReview> reviews = service.getReviewsForProject(projectService.getProject(testProjectURI))
    assertTrue("We should have a project review", 1 == reviews.size());
    IReview review = (IReview) reviews.toArray()[0];
    String label = review.getLabel();
    assertTrue("Review label is incorrect: " + label, label.contains("performed by"));
    assertFalse("Review label is incorrect: " + label, label.contains("null"));
View Full Code Here


    private static final Logger logger = LoggerFactory
        .getLogger(TestProjectService.class);
 
  @Test
  public void testGetProjectsWithRCS() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithRCS();
   
    Iterator<IProject> itr = projects.iterator();
    while (itr.hasNext()) {
      IProject project = itr.next();
      System.out.println(project + " has an RCS: " + project.getRepositories());
View Full Code Here

    assertEquals("Got incorrect number of projects with RCS", 2, projects.size());
  }
 
  @Test
  public void testGetProjectsWithoutRCS() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithoutRCS();
   
    Iterator<IProject> itr = projects.iterator();
    while (itr.hasNext()) {
      IProject project = itr.next();
      System.out.println(project + " has no RCS: " + project.getRepositories());
View Full Code Here

    assertEquals("Got incorrect number of projects without RCS", 7, projects.size());
  }

  @Test
  public void testGetProjectsById() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    IProject project = service.getProjectById(testProjectID);
    assertEquals("Got incorect project by ID","Simal DOAP Test", project.getName());
   
    logger.debug("Project RDF is:\n" + project.toXML());
   
    String shortID = testProjectID.substring(testProjectID.lastIndexOf("-") + 1);
    project = service.getProjectById(shortID);
    assertEquals("Got incorect project by ID","Simal DOAP Test", project.getName());
  }
View Full Code Here

    assertEquals("Got incorect project by ID","Simal DOAP Test", project.getName());
  }

  @Test
  public void testGetProjectsWithHomepage() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithHomepage();
    Iterator<IProject> itr = projects.iterator();
    while (itr.hasNext()) {
      IProject project = itr.next();
      System.out.println(project + " has homepages: " + project.getHomepages());
    }
View Full Code Here

      assertEquals("Got incorect number of projects with Homepage", 8, projects.size());
  }

  @Test
  public void testGetProjectsWithoutHomepage() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithoutHomepage();
    Iterator<IProject> itr = projects.iterator();
    while (itr.hasNext()) {
      IProject project = itr.next();
      System.out.println(project + " has no homepages: " + project.getHomepages());
    }
View Full Code Here

      assertEquals("Got incorect number of projects with Homepage", 1, projects.size());
  }

  @Test
  public void testGetProjectsWithMaintainer() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithMaintainer();
    assertEquals("Got incorect number of projects with Mainteiner", 7, projects.size());
  }
View Full Code Here

    assertEquals("Got incorect number of projects with Mainteiner", 7, projects.size());
  }
  @Test
  public void testGetProjectsWithMailingList() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithMailingList();
    assertEquals("Got incorect number of projects with MailingList", 4, projects.size());
  }
View Full Code Here

    assertEquals("Got incorect number of projects with MailingList", 4, projects.size());
  }

  @Test
  public void testGetProjectsWithBugDatabase() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithBugDatabase();
    assertEquals("Got incorect number of projects with BugDatabaseList", 4, projects.size());
  }
View Full Code Here

    assertEquals("Got incorect number of projects with BugDatabaseList", 4, projects.size());
  }

  @Test
  public void testGetProjectsWithReview() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    Set<IProject> projects = service.getProjectsWithReview();
    Iterator<IProject> itr = projects.iterator();
    while (itr.hasNext()) {
      IProject project = itr.next();
      System.out.println(project + " has at least one review: " + project.getHomepages());
    }
View Full Code Here

TOP

Related Classes of uk.ac.osswatch.simal.service.IProjectService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.