Package juzu.test.protocol.mock

Examples of juzu.test.protocol.mock.MockClient.render()


  public void testRenderError() throws Exception {
    MockApplication<?> app = application("plugin.controller.view.throwable.error").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertFailure(UnknownError.class);
  }

  @Test
  public void testActionChecked() throws Exception {
View Full Code Here


  public void testActionChecked() throws Exception {
    MockApplication<?> app = application("plugin.controller.action.throwable.checked").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockRequestBridge request = client.invoke(render.assertStringResponse());
    request.assertFailure(AuthenticationException.class);
  }

  @Test
View Full Code Here

  public void testActionRuntime() throws Exception {
    MockApplication<?> app = application("plugin.controller.action.throwable.runtime").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockRequestBridge request = client.invoke(render.assertStringResponse());
    request.assertFailure(ConcurrentModificationException.class);
  }

  @Test
View Full Code Here

  public void testActionError() throws Exception {
    MockApplication<?> app = application("plugin.controller.action.throwable.error").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockRequestBridge request = client.invoke(render.assertStringResponse());
    request.assertFailure(UnknownError.class);
  }

  @Test
View Full Code Here

  public void testResourceChecked() throws Exception {
    MockApplication<?> app = application("plugin.controller.resource.throwable.checked").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockRequestBridge request = client.invoke(render.assertStringResponse());
    request.assertFailure(AuthenticationException.class);
  }

  @Test
View Full Code Here

  public void testResourceRuntime() throws Exception {
    MockApplication<?> app = application("plugin.controller.resource.throwable.runtime").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockRequestBridge request = client.invoke(render.assertStringResponse());
    request.assertFailure(ConcurrentModificationException.class);
  }

  @Test
View Full Code Here

  public void testResourceError() throws Exception {
    MockApplication<?> app = application("plugin.controller.resource.throwable.error").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockRequestBridge request = client.invoke(render.assertStringResponse());
    request.assertFailure(UnknownError.class);
  }
}
View Full Code Here

  public void testImplicit() throws Exception {
    MockApplication<?> app = application("plugin.template.printer").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render("implicit");
    assertEquals("implicit_render", render.assertStringResponse());
  }
}
View Full Code Here

        helper,
        di,
        Name.parse("plugin.template.external"));
    app.init();
    MockClient client = app.client();
    assertEquals("hello", client.render().assertStringResponse());
  }

  @Test
  public void testControllerNotFound() throws Exception {
    CompilerAssert<File, File> compiler = compiler("plugin.template.controllernotfound");
View Full Code Here

  @Test
  public void testRelativePath() throws Exception {
    MockApplication<?> app = application("plugin.template.relativepath").init();
    MockClient client = app.client();
    assertEquals("relative_path_template", client.render().assertStringResponse());
  }

  @Test
  public void testTyped() throws Exception {
    MockApplication<?> app = application("plugin.template.typed").init();
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.