use of com.ibm.cohort.engine.api.service.model.MeasureParameterInfo in project quality-measure-and-cohort-service by Alvearie.
the class FHIRRestUtilsTest method testGetParametersForMeasureId.
@PrepareForTest({ FHIRRestUtils.class })
@Test
public void testGetParametersForMeasureId() {
String measureId = "measureId";
FhirResourceResolver<Measure> measureResolver = Mockito.mock(FhirResourceResolver.class);
Mockito.when(measureResolver.resolveById(measureId)).thenReturn(createMeasure(testMeasureDef));
List<MeasureParameterInfo> parameterInfoList = FHIRRestUtils.getParametersForMeasureId(measureResolver, measureId);
MeasureParameterInfo expectedParamInfo = new MeasureParameterInfo();
expectedParamInfo.setname("aName");
expectedParamInfo.setUse("In");
expectedParamInfo.setMax("1");
expectedParamInfo.setMin(0);
expectedParamInfo.setType("String");
expectedParamInfo.setDocumentation(null);
expectedParamInfo.defaultValue("42");
assertThat(parameterInfoList, containsInAnyOrder(expectedParamInfo));
}
Aggregations