@Test public void testInvalidOptions() throws Exception { exception.expect(ParameterException.class); Main.main(array("nonse -o nse c -p ommand line")); }
public static void main(String[] args) throws IOException { try { Strict arguments = new CommandLineArguments().parse(args); if (arguments.isHelp()) { System.out.println(arguments.getHelp()); } else if (arguments.isVersion()) { System.out.println("mux2fs version " + arguments.getVersion()); } else { arguments.validate(); mount(arguments); } } catch (Exception e) { System.err.println(CommandLineArguments.getUsage()); throw e; } }
Main { public static void main(String[] args) throws IOException { try { Strict arguments = new CommandLineArguments().parse(args); if (arguments.isHelp()) { System.out.println(arguments.getHelp()); } else if (arguments.isVersion()) { System.out.println("mux2fs version " + arguments.getVersion()); } else { arguments.validate(); mount(arguments); } } catch (Exception e) { System.err.println(CommandLineArguments.getUsage()); throw e; } } }
Main { public static void main(String[] args) throws IOException { try { Strict arguments = new CommandLineArguments().parse(args); if (arguments.isHelp()) { System.out.println(arguments.getHelp()); } else if (arguments.isVersion()) { System.out.println("mux2fs version " + arguments.getVersion()); } else { arguments.validate(); mount(arguments); } } catch (Exception e) { System.err.println(CommandLineArguments.getUsage()); throw e; } }  }
Main { public static void main(String[] args) throws IOException { try { Strict arguments = new CommandLineArguments().parse(args); if (arguments.isHelp()) { System.out.println(arguments.getHelp()); } else if (arguments.isVersion()) { System.out.println("mux2fs version " + arguments.getVersion()); } else { arguments.validate(); mount(arguments); } } catch (Exception e) { System.err.println(CommandLineArguments.getUsage()); throw e; } }  static void main(String[] args); }
Main { public static void main(String[] args) throws IOException { try { Strict arguments = new CommandLineArguments().parse(args); if (arguments.isHelp()) { System.out.println(arguments.getHelp()); } else if (arguments.isVersion()) { System.out.println("mux2fs version " + arguments.getVersion()); } else { arguments.validate(); mount(arguments); } } catch (Exception e) { System.err.println(CommandLineArguments.getUsage()); throw e; } }  static void main(String[] args);  }