@Test public void testMain() { final StringBuffer stringBuffer = new StringBuffer(); PrintStream stdOut = System.out; PrintStream myOut = new PrintStream(new OutputStream() { @Override public void write(int b) throws IOException { stringBuffer.append((char) b); } }); System.setOut(myOut); WadlViewer.main(new String[]{"src/test/resources/domain_SLI.wadl"}); System.setOut(stdOut); assertFalse(stringBuffer.toString().equals("")); }
public static void main(final String[] args) { String inputFilename = (args.length == 1) ? args[0] : DEFAULT_INPUT_FILENAME; try { final Application app = WadlReader.readApplication(inputFilename); final WadlWalker walker = new WadlWalker(new WadlViewerHandler()); walker.walk(app); } catch (final FileNotFoundException e) { LOG.warn(e.getMessage()); } }
WadlViewer { public static void main(final String[] args) { String inputFilename = (args.length == 1) ? args[0] : DEFAULT_INPUT_FILENAME; try { final Application app = WadlReader.readApplication(inputFilename); final WadlWalker walker = new WadlWalker(new WadlViewerHandler()); walker.walk(app); } catch (final FileNotFoundException e) { LOG.warn(e.getMessage()); } } }
WadlViewer { public static void main(final String[] args) { String inputFilename = (args.length == 1) ? args[0] : DEFAULT_INPUT_FILENAME; try { final Application app = WadlReader.readApplication(inputFilename); final WadlWalker walker = new WadlWalker(new WadlViewerHandler()); walker.walk(app); } catch (final FileNotFoundException e) { LOG.warn(e.getMessage()); } } WadlViewer(); }
WadlViewer { public static void main(final String[] args) { String inputFilename = (args.length == 1) ? args[0] : DEFAULT_INPUT_FILENAME; try { final Application app = WadlReader.readApplication(inputFilename); final WadlWalker walker = new WadlWalker(new WadlViewerHandler()); walker.walk(app); } catch (final FileNotFoundException e) { LOG.warn(e.getMessage()); } } WadlViewer(); static void main(final String[] args); }
WadlViewer { public static void main(final String[] args) { String inputFilename = (args.length == 1) ? args[0] : DEFAULT_INPUT_FILENAME; try { final Application app = WadlReader.readApplication(inputFilename); final WadlWalker walker = new WadlWalker(new WadlViewerHandler()); walker.walk(app); } catch (final FileNotFoundException e) { LOG.warn(e.getMessage()); } } WadlViewer(); static void main(final String[] args); static final String DEFAULT_INPUT_FILENAME; }