示例#1
0
 public void testClassNotFound() throws Exception {
   CommandRunner runner = new CommandRunner("java BadClass", null);
   runner.run();
   assertHasRegexp("java.lang.NoClassDefFoundError", runner.getError());
   assertEquals("", runner.getOutput());
   assertTrue(0 != runner.getExitCode());
 }
示例#2
0
 public void testBasics() throws Exception {
   CommandRunner runner =
       new CommandRunner("java -cp ./classes fitnesse.testutil.Echo", "echo this!");
   runner.run();
   assertHasRegexp("echo this!", runner.getOutput());
   assertEquals("", runner.getError());
   assertEquals(false, runner.hasExceptions());
   assertEquals(0, runner.getExitCode());
 }