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 18
18
import java .io .File ;
19
19
import java .net .URL ;
20
20
21
+ import org .junit .Assert ;
21
22
import org .junit .Test ;
22
23
23
24
import org .xml .sax .InputSource ;
25
+
24
26
import static uk .co .real_logic .sbe .xml .XmlSchemaParser .parse ;
25
27
26
28
public class RelativeXIncludeTest
@@ -29,12 +31,14 @@ public class RelativeXIncludeTest
29
31
public void shouldParseFileInSubDir ()
30
32
throws Exception
31
33
{
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 );
35
36
37
+ final InputSource is = new InputSource (testResource .openStream ());
36
38
final File file = new File (testResource .getFile ());
37
39
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" ));
39
43
}
40
44
}
You can’t perform that action at this time.
0 commit comments