Search in sources :

Example 21 with Client

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

the class R05814_2Test method testTwoPetitionFiledDatesLtBirthDate.

@Test
public void testTwoPetitionFiledDatesLtBirthDate() throws Exception {
    Client client = client(SOME_DATE);
    checkRuleViolated(dto(client, placementEpisode(client, SOME_DATE.minusDays(1)), placementEpisode(client, SOME_DATE.minusDays(2))), RULE_NAME, 2);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 22 with Client

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

the class R05816Test method client.

public static Client client(Gender gender) {
    Client client = new Client();
    client.setIdentifier("ChIlDS40FG");
    client.setGender(gender);
    return client;
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client)

Example 23 with Client

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

the class R00738Test method testCreationDateEqBirthDate.

@Test
public void testCreationDateEqBirthDate() throws Exception {
    Client client = new Client();
    client.setCreationDate(LocalDate.of(2018, 1, 3));
    client.setBirthDate(LocalDate.of(2018, 1, 3));
    checkRuleSatisfied(client, RULE_NAME);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 24 with Client

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

the class R00741Test method testLanguagesAreDifferent.

@Test
public void testLanguagesAreDifferent() throws Exception {
    Client client = new Client();
    client.setPrimaryLanguageCode((short) 1);
    client.setSecondaryLanguageCode((short) 2);
    checkRuleSatisfied(client, RULE_NAME);
}
Also used : Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 25 with Client

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

the class R00741Test method testLanguagesAreUnknown.

@Test
public void testLanguagesAreUnknown() throws Exception {
    Client client = new Client();
    client.setPrimaryLanguageCode((short) 0);
    client.setSecondaryLanguageCode((short) 0);
    checkRuleSatisfied(client, RULE_NAME);
}
Also used : 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