use of gov.cms.qpp.conversion.Context in project qpp-conversion-tool by CMSgov.
the class TemplateIdTest method testGetTemplateIdHistoricalNoExtension.
@Test
void testGetTemplateIdHistoricalNoExtension() {
Context context = new Context();
context.setHistorical(true);
assertThat(TemplateId.PLACEHOLDER.getTemplateId(context)).isEqualTo(TemplateId.PLACEHOLDER.getRoot());
}
use of gov.cms.qpp.conversion.Context in project qpp-conversion-tool by CMSgov.
the class TemplateIdTest method setup.
@BeforeAll
static void setup() {
defaultsContext = new Context();
defaultsContext.setDoDefaults(true);
}
use of gov.cms.qpp.conversion.Context in project qpp-conversion-tool by CMSgov.
the class TemplateIdTest method testFindByTypeId2.
@Test
void testFindByTypeId2() {
TemplateId clinicalDocument = TemplateId.CLINICAL_DOCUMENT;
TemplateId actual = TemplateId.getTemplateId(clinicalDocument.getRoot(), clinicalDocument.getExtension(), new Context());
assertThat(actual).isSameAs(clinicalDocument);
}
use of gov.cms.qpp.conversion.Context in project qpp-conversion-tool by CMSgov.
the class TemplateIdTest method testGenerateTemplateIdString.
@Test
void testGenerateTemplateIdString() {
final String root = "asdf";
final String extension = "jkl;";
String actual = TemplateId.generateTemplateIdString(root, extension, new Context());
assertThat(actual).isEqualTo(root + ":" + extension);
}
use of gov.cms.qpp.conversion.Context in project qpp-conversion-tool by CMSgov.
the class TemplateIdTest method testInvalidExtensionFindWithExtensionEnforcementHappy.
@ParameterizedTest
@EnumSource(value = TemplateId.class)
void testInvalidExtensionFindWithExtensionEnforcementHappy(TemplateId templateId) {
System.setProperty(Extension.STRICT_EXTENSION, "yep");
TemplateId actual = TemplateId.getTemplateId(templateId.getRoot(), templateId.getExtension(), new Context());
assertThat(actual).isSameAs(templateId);
}
Aggregations