use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testValidationFailureOutcome.
@Test
void testValidationFailureOutcome() {
Metadata metadata = MetadataHelper.generateMetadata(new Node(), MetadataHelper.Outcome.VALIDATION_ERROR);
assertThat(metadata.getOverallStatus()).isFalse();
assertThat(metadata.getConversionStatus()).isTrue();
assertThat(metadata.getValidationStatus()).isFalse();
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testExtractsApm.
@Test
void testExtractsApm() {
Node node = new Node();
node.putValue(ClinicalDocumentDecoder.ENTITY_ID, MOCK_STRING);
Metadata metadata = MetadataHelper.generateMetadata(node, MetadataHelper.Outcome.SUCCESS);
assertThat(metadata.getApm()).isEqualTo(MOCK_STRING);
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testGenerateMetadataForNullNodeReturnsSkinnyMetadata.
@Test
void testGenerateMetadataForNullNodeReturnsSkinnyMetadata() {
MetadataHelper.Outcome outcome = MetadataHelper.Outcome.VALIDATION_ERROR;
Metadata comparison = new Metadata();
comparison.setOverallStatus(false);
comparison.setConversionStatus(true);
comparison.setValidationStatus(false);
Metadata metadata = MetadataHelper.generateMetadata(null, outcome);
metadata.setCreatedDate(comparison.getCreatedDate());
assertThat(metadata).isEqualTo(comparison);
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testChildLacksCpcPlus.
@Test
void testChildLacksCpcPlus() {
Node node = new Node();
Node child = new Node();
child.setType(TemplateId.CLINICAL_DOCUMENT);
node.addChildNode(child);
Metadata metadata = MetadataHelper.generateMetadata(node, MetadataHelper.Outcome.SUCCESS);
assertThat(metadata.getCpc()).isNull();
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testConversionFailureOutcome.
@Test
void testConversionFailureOutcome() {
Metadata metadata = MetadataHelper.generateMetadata(new Node(), MetadataHelper.Outcome.CONVERSION_ERROR);
assertThat(metadata.getOverallStatus()).isFalse();
assertThat(metadata.getConversionStatus()).isFalse();
assertThat(metadata.getValidationStatus()).isFalse();
}
Aggregations