Package org.joggito.test.testdata

Examples of org.joggito.test.testdata.Person


  @Test
  public void convertingResourceToBean() throws Exception {
    final Resource johnDoeRsc = RDFSamples.getJohnDoe();
    // RUN...
    Person johnDoe = factory.createBean(johnDoeRsc);

    // test...
    assertEquals(johnDoeFirstName, johnDoe.getFirstName());
    assertEquals(doeFamilyName, johnDoe.getFamilyName());
    assertEquals(johnDoeBirthday, johnDoe.getBirthday());
    assertEquals(johnDoeMBoxSHA1, johnDoe.getMboxSHA1());
    assertTrue(contains(johnDoe.getMailAddresses(), johnDoeMbox1));
    assertTrue(contains(johnDoe.getMailAddresses(), johnDoeMbox2));
    assertTrue(johnDoe.getPhones().contains(johnDoePhone1));
    assertTrue(johnDoe.getPhones().contains(johnDoePhone2));
    assertEquals(1, johnDoe.getFriends().size());

    // test Mary Doe...
    Person maryDoe = johnDoe.getFriends().get(0);
    assertEquals(maryDoeFirstName, maryDoe.getFirstName());
    assertEquals(doeFamilyName, maryDoe.getFamilyName());
  }
View Full Code Here

TOP

Related Classes of org.joggito.test.testdata.Person

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.