Package juzu.test.protocol.mock

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


    MockApplication<?> app = application("plugin.controller.url.invalidproperty");
    app.init();

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


    if (getDI() == InjectorProvider.WELD) {
      MockApplication<?> app = application("plugin.controller.postconstruct").init();

      //
      MockClient client = app.client();
      client.render();
      Integer count = Registry.get("count");
      assertEquals((Integer)1, count);
    }
  }
}
View Full Code Here

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("<foo>bar</foo>", out);
  }

  @Test
View Full Code Here

  @Test
  public void testDispatch() throws Exception {
    MockApplication<?> app = application("plugin.controller.lifecycle.dispatch").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertStringResponse("index");
    Integer count = Registry.get("count");
    assertEquals((Integer)2, count);
  }
View Full Code Here

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("<juu><foo>bar</foo></juu>", out);
  }

  @Test
View Full Code Here

  @Test
  public void testOverrideBegin() throws Exception {
    MockApplication<?> app = application("plugin.controller.lifecycle.overridebegin").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertStringResponse("begin");
    Integer count = Registry.get("count");
    assertEquals((Integer)0, count);
  }
View Full Code Here

  @Test
  public void testOverrideEnd() throws Exception {
    MockApplication<?> app = application("plugin.controller.lifecycle.overrideend").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertStringResponse("end");
    Integer count = Registry.get("count");
    assertEquals((Integer)2, count);
  }
View Full Code Here

        helper,
        di,
        Name.parse("plugin.template.tag.decorateexternal"));
    app.init();
    MockClient client = app.client();
    assertEquals("<foo>bar</foo>", client.render().assertStringResponse());
  }

  @Test
  public void testInclude() throws Exception {
    MockApplication<?> app = application("plugin.template.tag.include").init();
View Full Code Here

  @Test
  public void testFailureBegin() throws Exception {
    MockApplication<?> app = application("plugin.controller.lifecycle.failurebegin").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertFailure(ConcurrentModificationException.class);
    Integer count = Registry.get("count");
    assertEquals((Integer)0, count);
  }
View Full Code Here

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("foo", out);
  }

  @Test
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.