Search in sources :

Example 21 with Address

use of gov.ca.cwds.rest.api.domain.Address in project API by ca-cwds.

the class ParticipantResourceTest method testUpdate404NotFoundError.

@Override
@Test
public void testUpdate404NotFoundError() throws Exception {
    roles.add("victim");
    Address address = new Address("", "", "123 First St", "San Jose", "CA", 94321, "Home");
    addresses.add(address);
    Participant participant = new Participant(1, "", "", "Marge", "Simpson", "Female", "111223333", "2017-01-11", 123, 456, roles, addresses);
    int receivedStatus = inMemoryResource.client().target(ROOT_RESOURCE).request().accept(MediaType.APPLICATION_JSON).put(Entity.entity(participant, MediaType.APPLICATION_JSON)).getStatus();
    int expectedStatus = 405;
    assertThat(receivedStatus, is(expectedStatus));
}
Also used : Address(gov.ca.cwds.rest.api.domain.Address) Participant(gov.ca.cwds.rest.api.domain.Participant) Test(org.junit.Test)

Aggregations

Address (gov.ca.cwds.rest.api.domain.Address)21 Test (org.junit.Test)19 PostedAddress (gov.ca.cwds.rest.api.domain.PostedAddress)7 PersonAddress (gov.ca.cwds.data.persistence.ns.PersonAddress)3 Participant (gov.ca.cwds.rest.api.domain.Participant)3 Ethnicity (gov.ca.cwds.rest.api.domain.Ethnicity)2 Language (gov.ca.cwds.rest.api.domain.Language)2 Person (gov.ca.cwds.rest.api.domain.Person)2 PhoneNumber (gov.ca.cwds.rest.api.domain.PhoneNumber)2 PostedPerson (gov.ca.cwds.rest.api.domain.PostedPerson)2 Race (gov.ca.cwds.rest.api.domain.Race)2 HashSet (java.util.HashSet)2 ImmutableList (com.google.common.collect.ImmutableList)1 PersonEthnicity (gov.ca.cwds.data.persistence.ns.PersonEthnicity)1 PersonLanguage (gov.ca.cwds.data.persistence.ns.PersonLanguage)1 PersonPhone (gov.ca.cwds.data.persistence.ns.PersonPhone)1 PersonRace (gov.ca.cwds.data.persistence.ns.PersonRace)1 ScreeningRequest (gov.ca.cwds.rest.api.domain.ScreeningRequest)1