use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.
the class R00736Test method dto.
private static ClientEntityAwareDTO dto(String driverLicenseNumber, short driverLicenseStateCode) {
Client client = new Client();
client.setDriverLicenseNumber(driverLicenseNumber);
client.setDriverLicenseStateCode(driverLicenseStateCode);
ClientEntityAwareDTO dto = new ClientEntityAwareDTO();
dto.setEntity(client);
return dto;
}
use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.
the class R00739Test method testDeathDateGtBirthDate.
@Test
public void testDeathDateGtBirthDate() throws Exception {
Client client = new Client();
client.setBirthDate(LocalDate.of(2018, 1, 1));
client.setDeathDate(LocalDate.of(2098, 1, 3));
checkRuleSatisfied(client, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.
the class R00739Test method testDeathDateLtBirthDate.
@Test
public void testDeathDateLtBirthDate() throws Exception {
Client client = new Client();
client.setBirthDate(LocalDate.of(2098, 1, 3));
client.setDeathDate(LocalDate.of(2018, 1, 1));
checkRuleViolatedOnce(client, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.
the class ClientAbstractReadAuthorizerTest method clientSameCountySensitiveTest.
@Test
public void clientSameCountySensitiveTest() {
when(clientSensitivityDeterminationService.getClientSensitivityById(CLIENT_ID)).thenReturn(Sensitivity.SENSITIVE);
when(clientCountyDeterminationService.getClientCountiesById(anyString())).thenReturn(Arrays.asList(new Short[] { 1073, 1126 }));
final Client client = initClient(Sensitivity.SENSITIVE);
checkAllCases(client, "1073", "Colusa", false, true, false, true, false);
}
use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.
the class ClientAbstractReadAuthorizerTest method clientNoConditionsTest.
@Test
public void clientNoConditionsTest() {
when(clientSensitivityDeterminationService.getClientSensitivityById(CLIENT_ID)).thenReturn(Sensitivity.NOT_APPLICABLE);
when(clientCountyDeterminationService.getClientCountiesById(anyString())).thenReturn(Arrays.asList(new Short[] { 1023, 1034 }));
final Client client = initClient(Sensitivity.NOT_APPLICABLE);
checkAllCases(client, "1073", "Colusa", true, true, true, true, true);
}
Aggregations