@Test public void testReadInvalidFile() { try { new TypescriptInputReader(dependencyGraph).read("src/test/resources/typescript/not-an-xml-file.noxml"); fail("IllegalArgumentException expected"); } catch(IllegalArgumentException e) { assertThat(e.getCause()).isInstanceOf(IOException.class); assertThat(e.getMessage()).startsWith("com.fasterxml.jackson.core.JsonParseException: Unexpected close tag </invalid-end-tag>; expected </start-tag>"); } }
public void read(String filename) { FileSystemUtil.assertFileOrResourceExists(filename); TypescriptProject bean = readFile(filename); mapInput(bean); }
TypescriptInputReader { public void read(String filename) { FileSystemUtil.assertFileOrResourceExists(filename); TypescriptProject bean = readFile(filename); mapInput(bean); } }
TypescriptInputReader { public void read(String filename) { FileSystemUtil.assertFileOrResourceExists(filename); TypescriptProject bean = readFile(filename); mapInput(bean); } TypescriptInputReader(DependencyGraph dependencyGraph); }
TypescriptInputReader { public void read(String filename) { FileSystemUtil.assertFileOrResourceExists(filename); TypescriptProject bean = readFile(filename); mapInput(bean); } TypescriptInputReader(DependencyGraph dependencyGraph); void read(String filename); }
TypescriptInputReader { public void read(String filename) { FileSystemUtil.assertFileOrResourceExists(filename); TypescriptProject bean = readFile(filename); mapInput(bean); } TypescriptInputReader(DependencyGraph dependencyGraph); void read(String filename); static final String ROOT_NODE_NAME; static final String PARENT_PROPERTY; }