- TestUtils.loadModules("/negative-scenario/testfile0.yang", "/negative-scenario/testfile3.yang");
- fail("YangParseException should by thrown");
+ final List<InputStream> streams = new ArrayList<>(2);
+ try (InputStream testFile0 = new FileInputStream(getClass().getResource
+ ("/negative-scenario/testfile0.yang").getPath())) {
+ streams.add(testFile0);
+ try (InputStream testFile3 = new FileInputStream(getClass().getResource
+ ("/negative-scenario/testfile3.yang").getPath())) {
+ streams.add(testFile3);
+ assertEquals("Expected loaded files count is 2", 2,
+ streams.size());
+ TestUtils.loadModules(streams);
+ fail("YangParseException should by thrown");
+ }
+ }