Ejemplo n.º 1
0
  public void testRefresh() throws Exception {
    final MockAbstractBinder binder = new MockAbstractBinder(root, form, handler);

    binder.bind();
    binder.refresh();

    assertNotNull(form.getController().get("update()"));
  }
Ejemplo n.º 2
0
  public void testRefreshWithException() throws Exception {
    final MockAbstractBinder binder = new MockAbstractBinder(root, form, handler);
    final Exception ex = new IllegalArgumentException();
    form.getController().putException("update()", ex);

    binder.bind();
    binder.refresh();

    assertNull(form.getController().get("update()"));
    assertSame(ex, binder.get("handleException(Throwable)"));
  }