use of com.ociweb.pronghorn.pipe.MessageSchema 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();
}
}
}
use of com.ociweb.pronghorn.pipe.MessageSchema in project PronghornPipes by oci-pronghorn.
the class TemplateProcessGeneratorTest method testGenerateLowLevelWriterCleanCompile.
@Test
public void testGenerateLowLevelWriterCleanCompile() {
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 = "LowLevelWriter";
StringBuilder target = new StringBuilder();
TemplateProcessGeneratorLowLevelWriter simple = new TemplateProcessGeneratorLowLevelWriter(schema, target, true, "com.ociweb.pronghorn.pipe.build");
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();
}
}
}
Aggregations