use of gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory in project api-core by ca-cwds.
the class SchoolOriginHistoryDaoTest method findByClientId_success_whenSingleRecord.
@Test
public void findByClientId_success_whenSingleRecord() {
executeInTransaction(sessionFactory, (sessionFactory) -> {
// when
final Collection<SchoolOriginHistory> actualResults = testSubject.findByClientId("01234560Wl");
// then
assertThat(actualResults.size(), is(1));
final SchoolOriginHistory actual = actualResults.iterator().next();
assertThat(actual.getFkchldClt(), is("01234560Wl"));
assertThat(actual.getThirdId(), is("123yPpp0Wl"));
assertThat(actual.getSchoolDecision(), is(YesNoUnknown.YES));
assertThat(actual.getSchoolDecisionDate(), is(LocalDate.of(2013, 2, 2)));
assertThat(actual.getFkedPvdrt(), is("M6j2wGUq26"));
});
}
use of gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory in project api-core by ca-cwds.
the class R10293Test method rule10293_violated_whenOneOfTwoDasHistoriesIsBeforeDOB.
@Test
public void rule10293_violated_whenOneOfTwoDasHistoriesIsBeforeDOB() throws DroolsException {
// given
final Client client = client(SOME_DATE);
final SchoolOriginHistory history0 = schoolOriginHistory(SOME_DATE.plusDays(100));
final SchoolOriginHistory history1 = schoolOriginHistory(SOME_DATE.minusDays(100));
final ChildClientEntityAwareDTO input = dto(client, history0, history1);
// when + then
checkRuleViolatedOnce(input, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory in project api-core by ca-cwds.
the class ClientTestUtil method schoolOriginHistory.
public static SchoolOriginHistory schoolOriginHistory(LocalDate schoolDecisionDate) {
SchoolOriginHistory history = new SchoolOriginHistory();
history.setSchoolDecisionDate(schoolDecisionDate);
return history;
}
Aggregations