Package ratpack.test.handling

Examples of ratpack.test.handling.UnexpectedHandlerException


  }

  @Override
  public byte[] getBodyBytes() {
    if (throwable != null) {
      throw new UnexpectedHandlerException(throwable);
    }
    if (sentResponse) {
      return body;
    } else {
      return null;
View Full Code Here


  }

  @Override
  public String getBodyText() {
    if (throwable != null) {
      throw new UnexpectedHandlerException(throwable);
    }
    if (sentResponse) {
      return new String(body, CharsetUtil.UTF_8);
    } else {
      return null;
View Full Code Here

      throw new HandlerExceptionNotThrownException();
    } else {
      if (clazz.isAssignableFrom(throwable.getClass())) {
        return clazz.cast(throwable);
      } else {
        throw new UnexpectedHandlerException(throwable);
      }
    }
  }
View Full Code Here

  }

  @Override
  public boolean isCalledNext() {
    if (throwable != null) {
      throw new UnexpectedHandlerException(throwable);
    }
    return calledNext;
  }
View Full Code Here

  }

  @Override
  public <T> T rendered(Class<T> type) {
    if (throwable != null) {
      throw new UnexpectedHandlerException(throwable);
    }
    if (rendered == null) {
      return null;
    }
View Full Code Here

TOP

Related Classes of ratpack.test.handling.UnexpectedHandlerException

Copyright © 2018 www.massapicom. 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.