Package juzu.test.protocol.mock

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


  @Test
  public void testSimpleParameters() throws Exception {
    MockApplication<?> app = application("plugin.template.tag.simple.parameters").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("-[:]-[a:b]-", out);
  }

  @Test
View Full Code Here


  @Test
  public void testSimpleBody() throws Exception {
    MockApplication<?> app = application("plugin.template.tag.simple.body").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("<foo>the_body</foo>", out);
  }

  @Test
View Full Code Here

  @Test
  public void testSimpleNested() throws Exception {
    MockApplication<?> app = application("plugin.template.tag.simple.nested").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("<index><foo><bar>foo_content</bar></foo></index>", out);
  }

  @Test
View Full Code Here

  @Test
  public void testSimpleInclude() throws Exception {
    MockApplication<?> app = application("plugin.template.tag.simple.include").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("pass", out);
  }

  @Test
View Full Code Here

          helper,
          di,
          Name.parse("plugin.template.tag.simple.reuse"));
      app.init();
      MockClient client = app.client();
      MockViewBridge render = client.render();
      String out = render.assertStringResponse();
      assertEquals("foothe_tagbar", out);
    }
    finally {
      ProcessingContext.baseCL = ProcessingContext.baseCL.getParent();
View Full Code Here

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @Test
  public void testRenderError() throws Exception {
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.