Search in sources :

Example 1 with Person

use of gov.ca.cwds.data.persistence.ns.Person in project API by ca-cwds.

the class PersonDaoIT method testCreate.

@Override
@Test
public void testCreate() {
    gov.ca.cwds.data.persistence.ns.Address toCreateAddress = new gov.ca.cwds.data.persistence.ns.Address(1L, "742 Evergreen Terrace", "Springfield", "WA", new Integer(98700), "Home");
    Set<PersonAddress> personAddresses = new HashSet<>();
    PersonAddress personAddress = new PersonAddress();
    personAddress.setAddress(toCreateAddress);
    personAddresses.add(personAddress);
    Person person = new Person(null, "John", "Doe", "Male", new Date(), "111-11-1111", personAddresses, null, null, null, null);
    Person created = personDao.create(person);
    assertThat(created, is(person));
}
Also used : PersonAddress(gov.ca.cwds.data.persistence.ns.PersonAddress) PersonAddress(gov.ca.cwds.data.persistence.ns.PersonAddress) Date(java.util.Date) Person(gov.ca.cwds.data.persistence.ns.Person) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

Person (gov.ca.cwds.data.persistence.ns.Person)1 PersonAddress (gov.ca.cwds.data.persistence.ns.PersonAddress)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1 Test (org.junit.Test)1