Search in sources :

Example 6 with Client

use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.

the class R00756Test method testPrimaryRelationshipStartDateEqBirthDate.

@Test
public void testPrimaryRelationshipStartDateEqBirthDate() throws Exception {
    Client client = client(SOME_DATE);
    checkRuleSatisfied(dto(client, primaryRelationship("Aaqj06L00h", client, "AapJGAU04Z", SOME_DATE)), RULE_NAME);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 7 with Client

use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.

the class R00756Test method testPrimaryRelationshipBirthDateNull.

@Test
public void testPrimaryRelationshipBirthDateNull() throws Exception {
    Client client = client(null);
    checkRuleSatisfied(dto(client, primaryRelationship("Aaqj06L00h", client, "AapJGAU04Z", SOME_DATE)), RULE_NAME);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 8 with Client

use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.

the class R00756Test method testSecondaryRelationshipStartDateLtBirthDate.

@Test
public void testSecondaryRelationshipStartDateLtBirthDate() throws Exception {
    Client client = client(SOME_DATE);
    checkRuleViolatedOnce(dto(client, secondaryRelationship("Aaqj06L00h", "AapJGAU04Z", client, SOME_DATE.minusDays(1))), RULE_NAME);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 9 with Client

use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.

the class R00756Test method testTwoRelationshipsStartDateLtBirthDate.

@Test
public void testTwoRelationshipsStartDateLtBirthDate() throws Exception {
    Client client = client(SOME_DATE);
    checkRuleViolated(dto(client, primaryRelationship("Aaqj06L00h", client, "AckXIhU0QO", SOME_DATE.minusDays(1)), secondaryRelationship("AasRx3r0Ha", "AcqEeTo0Ql", client, SOME_DATE.minusDays(2))), RULE_NAME, 2);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 10 with Client

use of gov.ca.cwds.data.legacy.cms.entity.Client in project api-core by ca-cwds.

the class R02127Test method birthDateNotSet.

@Test
public void birthDateNotSet() throws Exception {
    Client client = new Client();
    client.setIdentifier(CLIENT_IDENTIFIER);
    clientEntityAwareDTO.setEntity(client);
    List<MedicalEligibilityApplication> medicalEligibilityApplications = generateListOfValidMedicalEligibilityApplications();
    clientEntityAwareDTO.getMedicalEligibilityApplications().addAll(medicalEligibilityApplications);
    checkRuleSatisfied(RULE_NAME);
}
Also used : MedicalEligibilityApplication(gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication) ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Aggregations

Client (gov.ca.cwds.data.legacy.cms.entity.Client)127 Test (org.junit.Test)105 ChildClientEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)21 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)14 ChildClient (gov.ca.cwds.data.legacy.cms.entity.ChildClient)13 BaseCwsCmsInMemoryPersistenceTest (gov.ca.cwds.data.legacy.cms.persistence.BaseCwsCmsInMemoryPersistenceTest)10 DasHistory (gov.ca.cwds.data.legacy.cms.entity.DasHistory)6 SafetyAlert (gov.ca.cwds.data.legacy.cms.entity.SafetyAlert)6 SchoolOriginHistory (gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory)6 ClientOtherEthnicity (gov.ca.cwds.data.legacy.cms.entity.ClientOtherEthnicity)4 NameType (gov.ca.cwds.data.legacy.cms.entity.syscodes.NameType)4 Session (org.hibernate.Session)4 Timestamp (java.sql.Timestamp)3 DeliveredService (gov.ca.cwds.data.legacy.cms.entity.DeliveredService)2 OptimisticLockException (javax.persistence.OptimisticLockException)2 IDataSet (org.dbunit.dataset.IDataSet)2 ITable (org.dbunit.dataset.ITable)2 ClientConditionUtils.toClientCondition (gov.ca.cwds.authorizer.util.ClientConditionUtils.toClientCondition)1 FacilityChildParameterObject (gov.ca.cwds.cals.web.rest.parameter.FacilityChildParameterObject)1 ClientEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.ClientEntityAwareDTO)1