use of com.ibm.cohort.cql.evaluation.parameters.IntervalParameter in project quality-measure-and-cohort-service by Alvearie.
the class SparkCqlEvaluatorTest method testReadCqlJobsSuccess.
@Test
public void testReadCqlJobsSuccess() throws Exception {
IntervalParameter measurementPeriod = new IntervalParameter();
measurementPeriod.setStart(new DateParameter("2020-01-01")).setEnd(new DateParameter("2021-01-01"));
IntegerParameter minimumAge = new IntegerParameter(17);
evaluator.hadoopConfiguration = new SerializableConfiguration(SparkHadoopUtil.get().conf());
CqlEvaluationRequests requests = evaluator.readJobSpecification("src/test/resources/simple-job/cql-jobs.json");
assertNotNull(requests);
assertEquals(measurementPeriod, requests.getGlobalParameters().get("Measurement Period"));
assertEquals(1, requests.getEvaluations().size());
assertEquals(minimumAge, requests.getEvaluations().get(0).getParameters().get("MinimumAge"));
}
Aggregations