Package uk.ac.osswatch.simal.model

Examples of uk.ac.osswatch.simal.model.IPerson


      assertNotNull("Can't find a person with the EMail " + testDeveloperEMail, person);
    }

    @Test
    public void testGetPerson() throws SimalRepositoryException {
      IPerson person = service.get(testDeveloperURI);
      assertNotNull("Can't find a person with the URI " + testDeveloperURI,
          person);
      assertEquals("Developer URI is not as expected ", RDFUtils
          .getDefaultPersonURI(testDeveloperID), person.getURI());
    }
View Full Code Here


          .getDefaultPersonURI(testDeveloperID), person.getURI());
    }
   
    @Test
    public void testGetByUsername() {
      IPerson person = service.findByUsername("nobodybythisname");
      assertNull("Shouldn't have a person with the username nobodybythisname", person);
     
      person = service.findByUsername("author");
      assertNotNull("Should have a person with the username 'author'", person);
    }
View Full Code Here

    UserApplication.initRepository(); // this initialises the repository and adds test data

    IProject project = SimalRepositoryFactory.getProjectService().findProjectBySeeAlso(TEST_PROJECT_SEEALSO);
    projectURI = project.getURI();

    IPerson developer = SimalRepositoryFactory.getPersonService().findBySeeAlso("http://foo.org/~developer/#me");
    developerURI = developer.getURI();

    logProjectData("before");
  }
View Full Code Here

    initRepository();

    maintainers = project1.getMaintainers();
    Iterator<IPerson> itr = maintainers.iterator();
    while (itr.hasNext()) {
      IPerson person = itr.next();
      logger.debug("Got person: " + person + " : " + person.getURI());
    }
    developers = project1.getDevelopers();
    helpers = project1.getHelpers();
    documenters = project1.getHelpers();
    translators = project1.getTranslators();
View Full Code Here

  @Test
  public void testGetDevelopers() throws SimalRepositoryException {
    logger.info("Starting testGetDevelopers");
    boolean hasDeveloper = false;
    Iterator<IPerson> people = project1.getDevelopers().iterator();
    IPerson person;
    while (!hasDeveloper && people.hasNext()) {
      person = people.next();
      if (person.getNames().contains(TEST_SIMAL_PROJECT_DEVELOPERS)) {
        hasDeveloper = true;
      }
      logger.debug("Got developer called {}", person);
      assertNotNull("No person should have a null ID (see " + person.getURI()
          + ")", person.getSimalID());
    }
    assertTrue("Project does not appear to have developer called "
        + TEST_SIMAL_PROJECT_DEVELOPERS, hasDeveloper);
    logger.info("Finished testGetDevelopers");
  }
View Full Code Here

  @Test
  public void testGetDocumenters() throws SimalRepositoryException {
    boolean hasDocumenter = false;
    Iterator<IPerson> people = project1.getDocumenters().iterator();
    IPerson person;
    while (!hasDocumenter && people.hasNext()) {
      person = people.next();
      if (person.getLabel().equals(TEST_SIMAL_PROJECT_DOCUMENTERS)) {
        hasDocumenter = true;
      }
    }
    assertTrue("Project does not appear to have documenter "
        + TEST_SIMAL_PROJECT_DOCUMENTERS, hasDocumenter);
View Full Code Here

  @Test
  public void testGetHelpers() throws SimalRepositoryException {
    boolean hasHelper = false;
    Iterator<IPerson> people = project1.getHelpers().iterator();
    IPerson person;
    while (!hasHelper && people.hasNext()) {
      person = people.next();
      if (person.getLabel().equals(TEST_SIMAL_PROJECT_HELPERS)) {
        hasHelper = true;
      }
    }
    assertTrue("Project does not appear to have helper "
        + TEST_SIMAL_PROJECT_HELPERS, hasHelper);
View Full Code Here

  @Test
  public void testGetMaintainers() throws SimalRepositoryException {
    boolean hasMaintainerOne = false;
    boolean hasMaintainerTwo = false;
    Iterator<IPerson> people = project1.getMaintainers().iterator();
    IPerson person;
    while ((!hasMaintainerOne || !hasMaintainerTwo) && people.hasNext()) {
      person = people.next();
      Set<String> names = person.getNames();
      logger.debug("Got a maintainer with the names {}", names);
      if (names.contains(TEST_SIMAL_PROJECT_MAINTAINER_ONE)) {
        hasMaintainerOne = true;
      } else if (names.contains(TEST_SIMAL_PROJECT_MAINTAINER_TWO)) {
        hasMaintainerTwo = true;
View Full Code Here

  @Test
  public void testGetTesters() throws SimalRepositoryException {
    boolean hasTesterOne = false;
    Iterator<IPerson> people = project1.getTesters().iterator();
    IPerson person;
    while (people.hasNext()) {
      person = people.next();
      if (person.getLabel().equals(TEST_SIMAL_PROJECT_TESTERS)) {
        hasTesterOne = true;
      }
    }
    assertTrue("Project does not appear to have tester "
        + TEST_SIMAL_PROJECT_TESTERS, hasTesterOne);
View Full Code Here

  @Test
  public void testGetTranslators() throws SimalRepositoryException {
    boolean hasTranslatorOne = false;
    Iterator<IPerson> people = project1.getTranslators().iterator();
    IPerson person;
    while (people.hasNext()) {
      person = people.next();
      if (person.getLabel().equals(TEST_SIMAL_PROJECT_TRANSLATORS)) {
        hasTranslatorOne = true;
      }
    }
    assertTrue("Project does not appear to have tester "
        + TEST_SIMAL_PROJECT_TRANSLATORS, hasTranslatorOne);
View Full Code Here

TOP

Related Classes of uk.ac.osswatch.simal.model.IPerson

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.