File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
sbe-tool/src/test/java/uk/co/real_logic/sbe/xml Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1818import java .io .File ;
1919import java .net .URL ;
2020
21+ import org .junit .Assert ;
2122import org .junit .Test ;
2223
2324import org .xml .sax .InputSource ;
25+
2426import static uk .co .real_logic .sbe .xml .XmlSchemaParser .parse ;
2527
2628public class RelativeXIncludeTest
@@ -29,12 +31,14 @@ public class RelativeXIncludeTest
2931 public void shouldParseFileInSubDir ()
3032 throws Exception
3133 {
32- final ClassLoader classLoader = getClass ().getClassLoader ();
33- final URL testResource = classLoader .getResource ("sub/basic-schema.xml" );
34- final InputSource is = new InputSource (testResource .openStream ());
34+ final URL testResource = getClass ().getClassLoader ().getResource ("sub/basic-schema.xml" );
35+ Assert .assertNotNull (testResource );
3536
37+ final InputSource is = new InputSource (testResource .openStream ());
3638 final File file = new File (testResource .getFile ());
3739 is .setSystemId (file .toPath ().toAbsolutePath ().getParent ().toUri ().toString ());
38- parse (is , ParserOptions .DEFAULT );
40+ final MessageSchema messageSchema = parse (is , ParserOptions .DEFAULT );
41+
42+ Assert .assertNotNull (messageSchema .getType ("Symbol" ));
3943 }
4044}
You can’t perform that action at this time.
0 commit comments