Examples of IOrganisation


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

  @Test
  public void testInstitutionImport() throws SimalRepositoryException {
    Iterator<IOrganisation> orgs = SimalRepositoryFactory.getOrganisationService().getAll().iterator();
    boolean orgIsValid = false;
    while (orgs.hasNext()) {
      IOrganisation org = orgs.next();
      if (org.getDefaultName().equals("Institution A")) {
        Set<IProject> currentProjects = org.getCurrentProjects();
        assertEquals("Don't have the right number of current projects for Institution A", 2, currentProjects.size());
        orgIsValid = true;
        break;
      }
    }
View Full Code Here

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

public class TestOrganisation extends BaseRepositoryTest {

    @Test
    public void testGetName() throws SimalRepositoryException {
      IOrganisation org = SimalRepositoryFactory.getOrganisationService().get("http://www.test.com/Organization");
      assertNotNull(org);
      assertEquals("Name is not as expected", TEST_SIMAL_ORGANISATION_NAME, org.getDefaultName());
    }
View Full Code Here

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

    com.hp.hpl.jena.rdf.model.Resource foafOrg = model.createResource(uri);
    Statement s = model.createStatement(foafOrg, RDF.type,
        Foaf.ORGANIZATION);
    model.add(s);

    IOrganisation org = new Organisation(foafOrg);
    return org;
  }
View Full Code Here

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

      assertEquals("Name is not as expected", TEST_SIMAL_ORGANISATION_NAME, org.getDefaultName());
    }
   
    @Test
    public void testAddName() throws SimalRepositoryException {
      IOrganisation org = SimalRepositoryFactory.getOrganisationService().get("http://www.test.com/Organization");
      String name = "Test Name";
      org.addName(name);
      assertEquals("Name is not as expected after adding new name", name, org.getDefaultName());
    }
View Full Code Here

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

      assertEquals("Name is not as expected after adding new name", name, org.getDefaultName());
    }
 
    @Test
    public void testAddCurrentProject() throws SimalRepositoryException {
      IOrganisation org = SimalRepositoryFactory.getOrganisationService().get("http://www.test.com/Organization");
      int countBefore = org.getCurrentProjects().size();
      org.addCurrentProject("http://test.com/project#1");
      int countAfter =  org.getCurrentProjects().size();;
      assertTrue("We don't seem to have added the current project", countBefore < countAfter);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.