Search in sources :

Example 11 with Detail

use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.

the class CpcQualityMeasureScopedValidatonTest method validateCms137V5FailMissingDenomStrata.

@Test
void validateCms137V5FailMissingDenomStrata() {
    Node result = scopedConversion(QrdaScope.MEASURE_REFERENCE_RESULTS_CMS_V2, "cms137v5.xml");
    removeMeasureStrata(result, SubPopulationLabel.DENOM.name());
    Set<Detail> details = validateNode(result);
    assertWithMessage("Missing CMS137v5 DENOM strata should result in errors").that(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(getMessages(SubPopulationLabel.DENOM.name(), "BC948E65-B908-493B-B48B-04AC342D3E6C", "EFB5B088-CE10-43DE-ACCD-9913B7AC12A2", "94B9555F-8700-45EF-B69F-433EBEDE8051"));
}
Also used : Node(gov.cms.qpp.conversion.model.Node) Detail(gov.cms.qpp.conversion.model.error.Detail) Test(org.junit.jupiter.api.Test)

Example 12 with Detail

use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.

the class CpcQualityMeasureScopedValidatonTest method validateCms137V5FailMissingDenexStrata.

@Test
void validateCms137V5FailMissingDenexStrata() {
    Node result = scopedConversion(QrdaScope.MEASURE_REFERENCE_RESULTS_CMS_V2, "cms137v5.xml");
    removeMeasureStrata(result, SubPopulationLabel.DENEX.name());
    Set<Detail> details = validateNode(result);
    assertWithMessage("Missing CMS137v5 DENEX strata should result in errors").that(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(getMessages(SubPopulationLabel.DENEX.name(), "56BC7FA2-C22A-4440-8652-2D3568852C60", "EFB5B088-CE10-43DE-ACCD-9913B7AC12A2", "94B9555F-8700-45EF-B69F-433EBEDE8051"));
}
Also used : Node(gov.cms.qpp.conversion.model.Node) Detail(gov.cms.qpp.conversion.model.error.Detail) Test(org.junit.jupiter.api.Test)

Example 13 with Detail

use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.

the class CpcQualityMeasureScopedValidatonTest method validateCms137V5FailMissingNumerStrata.

@Test
void validateCms137V5FailMissingNumerStrata() {
    Node result = scopedConversion(QrdaScope.MEASURE_REFERENCE_RESULTS_CMS_V2, "cms137v5.xml");
    removeMeasureStrata(result, SubPopulationLabel.NUMER.name());
    Set<Detail> details = validateNode(result);
    assertWithMessage("Missing CMS137v5 NUMER strata should result in errors").that(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(getMessages(SubPopulationLabel.NUMER.name(), "0BBF8596-4CFE-47F4-A0D7-9BEAB94BA4CD", "EFB5B088-CE10-43DE-ACCD-9913B7AC12A2", "94B9555F-8700-45EF-B69F-433EBEDE8051"));
}
Also used : Node(gov.cms.qpp.conversion.model.Node) Detail(gov.cms.qpp.conversion.model.error.Detail) Test(org.junit.jupiter.api.Test)

Example 14 with Detail

use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.

the class CpcQualityMeasureScopedValidatonTest method validateCms137V5.

@Test
void validateCms137V5() {
    Node result = scopedConversion(QrdaScope.MEASURE_REFERENCE_RESULTS_CMS_V2, "cms137v5.xml");
    Set<Detail> details = validateNode(result);
    assertWithMessage("Valid CMS137v5 markup should not result in errors").that(details).isEmpty();
}
Also used : Node(gov.cms.qpp.conversion.model.Node) Detail(gov.cms.qpp.conversion.model.error.Detail) Test(org.junit.jupiter.api.Test)

Example 15 with Detail

use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.

the class CpcQualityMeasureScopedValidatonTest method validateCms137V5FailMissingIpopStrata.

@Test
void validateCms137V5FailMissingIpopStrata() {
    Node result = scopedConversion(QrdaScope.MEASURE_REFERENCE_RESULTS_CMS_V2, "cms137v5.xml");
    removeMeasureStrata(result, "IPOP");
    Set<Detail> details = validateNode(result);
    assertWithMessage("Missing CMS137v5 IPOP strata should result in errors").that(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(getMessages("IPOP", "EC2C5F63-AF76-4D3C-85F0-5423F8C28541", "EFB5B088-CE10-43DE-ACCD-9913B7AC12A2", "94B9555F-8700-45EF-B69F-433EBEDE8051"));
}
Also used : Node(gov.cms.qpp.conversion.model.Node) Detail(gov.cms.qpp.conversion.model.error.Detail) Test(org.junit.jupiter.api.Test)

Aggregations

Detail (gov.cms.qpp.conversion.model.error.Detail)123 Test (org.junit.jupiter.api.Test)108 Node (gov.cms.qpp.conversion.model.Node)105 LocalizedError (gov.cms.qpp.conversion.model.error.LocalizedError)16 Converter (gov.cms.qpp.conversion.Converter)9 AllErrors (gov.cms.qpp.conversion.model.error.AllErrors)9 TransformException (gov.cms.qpp.conversion.model.error.TransformException)9 PathSource (gov.cms.qpp.conversion.PathSource)8 ArrayList (java.util.ArrayList)6 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)6 Context (gov.cms.qpp.conversion.Context)4 Test (org.junit.Test)4 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)4 QrdaDecoderEngine (gov.cms.qpp.conversion.decode.QrdaDecoderEngine)3 FormattedErrorCode (gov.cms.qpp.conversion.model.error.FormattedErrorCode)3 Path (java.nio.file.Path)2 LinkedHashSet (java.util.LinkedHashSet)2 InputStreamSupplierSource (gov.cms.qpp.conversion.InputStreamSupplierSource)1 JsonWrapper (gov.cms.qpp.conversion.encode.JsonWrapper)1 TemplateId (gov.cms.qpp.conversion.model.TemplateId)1