use of gov.cms.qpp.conversion.decode.QrdaDecoder in project qpp-conversion-tool by CMSgov.
the class NoArgThrowableConstructor method testRegistryGetProgramSpecificConverterHandler.
@Test
void testRegistryGetProgramSpecificConverterHandler() {
context.setProgram(Program.CPC);
registry.register(new ComponentKey(TemplateId.PLACEHOLDER, Program.ALL), Placeholder.class);
registry.register(new ComponentKey(TemplateId.PLACEHOLDER, Program.CPC), AnotherPlaceholder.class);
QrdaDecoder decoder = registry.get(TemplateId.PLACEHOLDER);
assertWithMessage("Registry should return %s instance.", AnotherPlaceholder.class.getName()).that(decoder).isInstanceOf(AnotherPlaceholder.class);
}
use of gov.cms.qpp.conversion.decode.QrdaDecoder in project qpp-conversion-tool by CMSgov.
the class NoArgThrowableConstructor method testRegistryGetHandlerWithNoArgMalcontentedConstructor.
@Test
void testRegistryGetHandlerWithNoArgMalcontentedConstructor() {
registry.register(new ComponentKey(TemplateId.PLACEHOLDER, Program.ALL), NoArgMalcontentedConstructor.class);
QrdaDecoder decoder = registry.get(TemplateId.PLACEHOLDER);
assertThat(decoder).isNull();
}
use of gov.cms.qpp.conversion.decode.QrdaDecoder in project qpp-conversion-tool by CMSgov.
the class NoArgThrowableConstructor method testRegistryGetHandlerWithMalcontentedConstructor.
@Test
void testRegistryGetHandlerWithMalcontentedConstructor() {
registry.register(new ComponentKey(TemplateId.PLACEHOLDER, Program.ALL), MalcontentedConstructor.class);
QrdaDecoder decoder = registry.get(TemplateId.PLACEHOLDER);
assertThat(decoder).isNull();
}
Aggregations