use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testMeasureCMS160v5PerformanceRateUuid.
@Test
void testMeasureCMS160v5PerformanceRateUuid() {
Converter converter = new Converter(new PathSource(INVALID_PERFORMANCE_UUID_FILE));
List<Detail> details = new ArrayList<>();
try {
converter.transform();
} catch (TransformException exception) {
AllErrors errors = exception.getDetails();
details.addAll(errors.getErrors().get(0).getDetails());
}
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(ErrorCode.QUALITY_MEASURE_ID_MISSING_SINGLE_PERFORMANCE_RATE);
}
use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testMeasureCMS52v5WithInsensitiveTextUuid.
@Test
void testMeasureCMS52v5WithInsensitiveTextUuid() {
Converter converter = new Converter(new PathSource(INSENSITIVE_TEXT_FILE));
List<Detail> details = new ArrayList<>();
try {
converter.transform();
} catch (TransformException exception) {
AllErrors errors = exception.getDetails();
details.addAll(errors.getErrors().get(0).getDetails());
}
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).doesNotContain(ErrorCode.MEASURE_GUID_MISSING);
}
use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class ClinicalDocumentValidatorTest method testClinicalDocumentValidationParsesMultipleErrors.
@Test
void testClinicalDocumentValidationParsesMultipleErrors() {
// setup
Path path = Paths.get("src/test/resources/negative/angerClinicalDocumentValidations.xml");
// execute
Context context = new Context();
context.setDoDefaults(true);
Converter converter = new Converter(new PathSource(path), context);
AllErrors allErrors = new AllErrors();
try {
converter.transform();
} catch (TransformException exception) {
allErrors = exception.getDetails();
}
List<Detail> errors = getErrors(allErrors);
assertWithMessage("Must have 4 errors").that(errors).hasSize(4);
assertWithMessage("Must contain the correct errors").that(errors).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsAllOf(ErrorCode.CLINICAL_DOCUMENT_MISSING_PROGRAM_NAME, ErrorCode.REPORTING_PARAMETERS_MUST_CONTAIN_SINGLE_PERFORMANCE_START);
}
use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class QualityMeasureScopedTest method scopedConversion.
private Node scopedConversion(QrdaScope testSection, String path) {
Converter converter = new Converter(new PathSource(Paths.get(path)));
converter.getContext().setScope(Sets.newHashSet(testSection));
converter.transform();
return converter.getReport().getDecoded();
}
use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class ValidationServiceImplTest method setup.
@BeforeAll
static void setup() throws IOException {
service = new ValidationServiceImpl(null);
pathToSubmissionError = Paths.get("src/test/resources/submissionErrorFixture.json");
pathToSubmissionDuplicateEntryError = Paths.get("src/test/resources/submissionDuplicateEntryErrorFixture.json");
Path toConvert = Paths.get("../qrda-files/valid-QRDA-III-latest.xml");
qppWrapper = new JsonWrapper(new Converter(new PathSource(toConvert)).transform(), false);
prepAllErrors();
}
Aggregations