use of org.mule.runtime.module.extension.internal.resources.documentation.ExtensionDocumentationResourceGenerator in project mule by mulesoft.
the class ExtensionDescriptionDocumenterTestCase method persistDocumentation.
@Test
public void persistDocumentation() throws Exception {
InputStream in = getClass().getResourceAsStream(expectedProductPath);
assertThat(in, is(notNullValue()));
String expectedXml = IOUtils.toString(in);
TestProcessor processor = new TestProcessor(extensionClass);
doCompile(processor);
ExtensionDocumentationResourceGenerator generator = new ExtensionDocumentationResourceGenerator();
GeneratedResource resource = generator.generateResource(processor.getExtensionModel()).orElseThrow(() -> new RuntimeException("No Documentation Generated"));
compareXML(expectedXml, new String(resource.getContent()));
}
Aggregations