Search in sources :

Example 1 with TemplateProcessGeneratorLowLevelReader

use of com.ociweb.pronghorn.pipe.util.build.TemplateProcessGeneratorLowLevelReader in project PronghornPipes by oci-pronghorn.

the class TemplateProcessGeneratorTest method testGenerateLowLevelReaderCleanCompile.

@Test
public void testGenerateLowLevelReaderCleanCompile() {
    if ("arm".equals(System.getProperty("os.arch"))) {
        assertTrue(true);
    } else {
        try {
            FieldReferenceOffsetManager from = TemplateHandler.loadFrom("/template/smallExample.xml");
            MessageSchema schema = new MessageSchemaDynamic(from);
            String className = "LowLevelReader";
            StringBuilder target = new StringBuilder();
            TemplateProcessGeneratorLowLevelReader simple = new TemplateProcessGeneratorLowLevelReader(schema, target);
            simple.processSchema();
            // System.out.println(target);
            validateCleanCompile(className, target);
        } catch (ParserConfigurationException e) {
            e.printStackTrace();
            fail();
        } catch (SAXException e) {
            e.printStackTrace();
            fail();
        } catch (IOException e) {
            e.printStackTrace();
            fail();
        }
    }
}
Also used : MessageSchema(com.ociweb.pronghorn.pipe.MessageSchema) TemplateProcessGeneratorLowLevelReader(com.ociweb.pronghorn.pipe.util.build.TemplateProcessGeneratorLowLevelReader) MessageSchemaDynamic(com.ociweb.pronghorn.pipe.MessageSchemaDynamic) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) IOException(java.io.IOException) FieldReferenceOffsetManager(com.ociweb.pronghorn.pipe.FieldReferenceOffsetManager) SAXException(org.xml.sax.SAXException) Test(org.junit.Test)

Aggregations

FieldReferenceOffsetManager (com.ociweb.pronghorn.pipe.FieldReferenceOffsetManager)1 MessageSchema (com.ociweb.pronghorn.pipe.MessageSchema)1 MessageSchemaDynamic (com.ociweb.pronghorn.pipe.MessageSchemaDynamic)1 TemplateProcessGeneratorLowLevelReader (com.ociweb.pronghorn.pipe.util.build.TemplateProcessGeneratorLowLevelReader)1 IOException (java.io.IOException)1 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)1 Test (org.junit.Test)1 SAXException (org.xml.sax.SAXException)1