use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class CpcMeasureDataValidatorTest method validateFailureSupplementalDataMissingCountTest.
@Test
void validateFailureSupplementalDataMissingCountTest() throws Exception {
String failurePayerFile = TestHelper.getFixture("failureSupplementalDataCountFile.xml");
Node placeholder = new QrdaDecoderEngine(new Context()).decode(XmlUtils.stringToDom(failurePayerFile));
CpcMeasureDataValidator validator = new CpcMeasureDataValidator();
Node underTest = placeholder.findFirstNode(TemplateId.MEASURE_DATA_CMS_V2);
validator.internalValidateSingleNode(underTest);
LocalizedError expectedError = ErrorCode.CPC_PLUS_SUPPLEMENTAL_DATA_MISSING_COUNT.format(SupplementalData.MALE.getCode(), SubPopulationLabel.IPOP.name(), MEASURE_ID);
Set<Detail> errors = validator.getDetails();
assertThat(errors).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(expectedError);
}
use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class ErrorCodeTest method testFormattedEqualsIdentity.
@Test
void testFormattedEqualsIdentity() {
LocalizedError formatted = formatted("mock");
new EqualsTester().addEqualityGroup(formatted).testEquals();
}
use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class CpcQualityMeasureSectionValidatorTest method tooFewBmeasures.
@Test
void tooFewBmeasures() {
Node node = setupMeasures(groupAmeasures, new String[] { groupBmeasures[0] });
LocalizedError message = CpcGroupMinimum.B.makeError(groupBmeasures);
validator.internalValidateSingleNode(node);
assertThat(validator.getDetails()).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(message);
}
use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class CpcQualityMeasureSectionValidatorTest method missingGroupBmeasures.
@Test
void missingGroupBmeasures() {
Node node = setupMeasures(groupAmeasures);
LocalizedError message = CpcGroupMinimum.B.makeError(groupBmeasures);
validator.internalValidateSingleNode(node);
assertThat(validator.getDetails()).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(message);
}
use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class CpcQualityMeasureSectionValidatorTest method tooFewOverallmeasures.
@Test
void tooFewOverallmeasures() {
Node node = setupMeasures(groupAmeasures, groupBmeasures);
LocalizedError message = CpcGroupMinimum.makeOverallError(overallMeasures);
validator.internalValidateSingleNode(node);
assertThat(validator.getDetails()).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(message);
}
Aggregations