Search in sources :

Example 1 with Registry

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

the class EncoderTest method decodeTemplateIds.

/**
 * decodeTemplateIds for each TemplateId in the list ensure that it exists in
 * the registry.
 * @throws Exception
 */
@Test
void decodeTemplateIds() throws Exception {
    Registry<OutputEncoder> registry = new Registry<>(new Context(), Encoder.class);
    for (TemplateId templateId : templateIds) {
        OutputEncoder encoder = registry.get(templateId);
        assertWithMessage(templateId + " returned node should not be null").that(encoder).isNotNull();
    }
}
Also used : Context(gov.cms.qpp.conversion.Context) Registry(gov.cms.qpp.conversion.model.Registry) TemplateId(gov.cms.qpp.conversion.model.TemplateId) Test(org.junit.jupiter.api.Test)

Example 2 with Registry

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

the class DecoderTest method decodeTemplateIds.

@Test
void decodeTemplateIds() throws Exception {
    Registry<QrdaDecoder> registry = new Registry<>(new Context(), Decoder.class);
    for (TemplateId templateId : templateIds) {
        QrdaDecoder decoder = registry.get(templateId);
        assertWithMessage("%s returned node should not be null", templateId.name()).that(decoder).isNotNull();
    }
}
Also used : Context(gov.cms.qpp.conversion.Context) Registry(gov.cms.qpp.conversion.model.Registry) TemplateId(gov.cms.qpp.conversion.model.TemplateId) Test(org.junit.jupiter.api.Test)

Aggregations

Context (gov.cms.qpp.conversion.Context)2 Registry (gov.cms.qpp.conversion.model.Registry)2 TemplateId (gov.cms.qpp.conversion.model.TemplateId)2 Test (org.junit.jupiter.api.Test)2