Examples of assertStringResponse()


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

  @Test
  public void testBasic() throws Exception {
    MockApplication<?> app = application("basic").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("foo", render.assertStringResponse());
  }

  @Test
  public void testResolveParameter() throws Exception {
    MockApplication<?> app = application("resolveparameter").init();
View Full Code Here

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

  @Test
  public void testResolveParameter() throws Exception {
    MockApplication<?> app = application("resolveparameter").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("bar", render.assertStringResponse());
  }

  @Test
  public void testResolveBean() throws Exception {
    MockApplication<?> app = application("resolvebean").init();
View Full Code Here

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

  @Test
  public void testResolveBean() throws Exception {
    MockApplication<?> app = application("resolvebean").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("bar", render.assertStringResponse());
  }

  @Test
  public void testPartial() throws Exception {
    MockApplication<?> app = application("partial").init();
View Full Code Here

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

  @Test
  public void testPartial() throws Exception {
    MockApplication<?> app = application("partial").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("<bar>foo</bar>", render.assertStringResponse());
  }

  @Test
  public void testParameterDeclaration() throws Exception {
    if (getDI() != InjectorProvider.GUICE) {
View Full Code Here

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

  public void testParameterDeclaration() throws Exception {
    if (getDI() != InjectorProvider.GUICE) {
      MockApplication<?> app = application("parameterdeclaration").init();
      MockClient client = app.client();
      MockViewBridge render = client.render();
      assertEquals("bar", render.assertStringResponse());
    }
  }
}
View Full Code Here

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

    SharedMetricRegistries.clear();                                                             //<1>
    MockApplication<File> application = application(InjectorProvider.GUICE, "examples.metrics");//<2>
    application.init();
    MockClient client = application.client();
    MockViewBridge view = client.render();                                                      //<3>
    assertEquals("ok", view.assertStringResponse());
    assertEquals(Collections.singleton("examples.metrics"), SharedMetricRegistries.names());    //<4>
    MetricRegistry registry = SharedMetricRegistries.getOrCreate("examples.metrics");
    Timer timer = registry.getTimers().get("juzu.responses");                                   //<5>
    assertEquals(1, timer.getCount());
    Meter meter = registry.getMeters().get("custom");                                           //<6>
View Full Code Here

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

  public void testResolveBundle() throws Exception {
    MockApplication<File> application = application(InjectorProvider.GUICE, "examples.app1"); //<1>
    application.init();                                                                       //<2>
    MockClient client = application.client();
    MockViewBridge view = client.render();                                                    //<3>
    String markup = view.assertStringResponse();
    assertEquals("<abc>def</abc>", markup);                                                   //<4>
  }
  // end::testResolveBundle[]

  // tag::testBundleNotFound[]
View Full Code Here

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("render_phase", render.assertStringResponse());

    //
    String url = render.getTitle();
    MockActionBridge action = (MockActionBridge)client.invoke(url);
    //
View Full Code Here

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockViewBridge action = (MockViewBridge)client.invoke(render.assertStringResponse());
    String result = action.assertStringResponse();
    assertEquals("pass", result);
  }

  private <T extends Throwable> T  runParseError(String pkg, Class<T> expected) throws Exception {
    MockApplication<File> application = application(InjectorProvider.GUICE, pkg);
View Full Code Here

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

    MockApplication<?> app = application.init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String url = render.assertStringResponse();
    JSON json = (JSON)JSON.parse(url);
    json.set("parameters", new JSON());
    MockViewBridge action = (MockViewBridge)client.invoke(json.toString());
    String result = action.assertStringResponse();
    assertEquals("pass", result);
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.