Examples of MethodExecuted


Examples of br.com.caelum.vraptor.events.MethodExecuted

  @Test
  public void whenResultIsNullShouldDoNothing() throws Exception {
    when(controllerMethod.getMethod()).thenReturn(getMethod("download"));
    when(result.used()).thenReturn(true);
    downloadObserver.download(new MethodExecuted(controllerMethod, methodInfo), result);
    verifyZeroInteractions(response);
  }
View Full Code Here

Examples of br.com.caelum.vraptor.events.MethodExecuted

  @Test
  public void whenResultWasUsedShouldDoNothing() throws Exception {
    when(controllerMethod.getMethod()).thenReturn(getMethod("download"));
    when(methodInfo.getResult()).thenReturn(null);
    downloadObserver.download(new MethodExecuted(controllerMethod, methodInfo), result);
    verifyZeroInteractions(response);
  }
View Full Code Here

Examples of br.com.caelum.vraptor.events.MethodExecuted

                + "validator.onErrorUse(page()).of(AnyController.class).anyMethod();\n"
                + "or any view that you like.\n"
                + "If you didn't add any validation error, it is possible that a conversion error had happened.");
      }
      this.methodInfo.setResult(result);
      methodExecutedEvent.fire(new MethodExecuted(method, methodInfo));
    } catch (IllegalArgumentException e) {
      throw new InterceptionException(e);
    } catch (Exception e) {
      throwIfNotValidationException(e, new InterceptionException(e));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.