Package juzu.test.protocol.mock

Examples of juzu.test.protocol.mock.MockViewBridge.assertStringResponse()


    app.init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    JSON url = (JSON)JSON.parse(render.assertStringResponse());
    assertFalse(url.getJSON("properties").contains(PropertyType.ESCAPE_XML.getClass().getName()));
  }

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


    app.init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    JSON url = (JSON)JSON.parse(render.assertStringResponse());
    assertEquals(Boolean.TRUE, url.getJSON("properties").get(PropertyType.ESCAPE_XML.getClass().getName()));
  }

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

    app.init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("pass", render.assertStringResponse());
  }
}
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);
  }

  @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);
  }

  @Test
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);
  }

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