Exemplo n.º 1
0
  @Test(expected = IllegalArgumentException.class)
  public void executeFail() {
    TestExecutor te = new TestExecutor();
    ExecutorWrapper ew = new ExecutorWrapper(te);

    ew.execute(null);
    fail("Exception should have thrown");
  }
Exemplo n.º 2
0
  @Test
  public void executeTest() {
    TestExecutor te = new TestExecutor();
    ExecutorWrapper ew = new ExecutorWrapper(te);
    Runnable r = new TestRunnable();

    ew.execute(r);

    assertTrue(te.lastCommand == r);
  }