コード例 #1
0
 protected static SchemaElement getSchema(String filename) {
   String file_contents = failsafeGetFile(filename);
   SchemaElement se = null;
   try {
     se = SchemaElement.parseSchemaFromString(file_contents);
   } catch (ReadException e) {
     // TODO Auto-generated catch block
     fail(e.getMessage());
   }
   return se;
 }
コード例 #2
0
 @Test
 public void testSimpleList() {
   SchemaElement se = getSchema("test/Schema-3.txt");
   String file_contents = failsafeGetFile("test/Message-2.txt");
   ;
   try {
     se.readContentsFromString(file_contents);
   } catch (ReadException e) {
     // TODO Auto-generated catch block
     fail(e.getMessage());
   }
   System.out.println(se.toString());
 }