Package juzu.test.protocol.mock

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


    MockApplication<?> app = application("plugin.binding.implementation.create").init();

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


    MockApplication<?> app = application("plugin.binding.create").init();

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

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

    MockApplication<?> app = application("plugin.binding.scope").init();

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String url = render.assertStringResponse();
    assertNotSame("", url);

    //
    render = (MockViewBridge)client.invoke(url);
    String result = render.assertStringResponse();
View Full Code Here

    String url = render.assertStringResponse();
    assertNotSame("", url);

    //
    render = (MockViewBridge)client.invoke(url);
    String result = render.assertStringResponse();
    assertEquals("pass", result);
  }
}
View Full Code Here

  @Test
  public void testFailure() throws Exception {
    MockApplication<?> app = application("plugin.controller.requestfilter.failure").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    assertEquals("pass", render.assertStringResponse());
  }

  @Test
  public void testFailing() throws Exception {
    MockApplication<?> app = application("plugin.controller.requestfilter.failing").init();
View Full Code Here

    MockApplication app = application(pkg).init();
    MockClient client = app.client();
    shared = null;
    MockViewBridge render = client.render();
    render.assertOk();
    render.assertStringResponse("hello");
    assertNotNull(shared);
    return shared;
  }

  @Test
View Full Code Here

  @Test
  public void testMimeType() throws Exception {
    MockApplication app = application("plugin.controller.mimetype.html").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertStringResponse("HELLO");
    Iterable<String> mimeType = render.getResponse().getProperties().getValues(PropertyType.MIME_TYPE);
    assertNotNull(mimeType);
    Iterator<String> iterator = mimeType.iterator();
    assertTrue(iterator.hasNext());
    assertEquals("text/html", iterator.next());
View Full Code Here

    // We only use CDI for its capability to discover beans automatically
    MockApplication<?> application = application(InjectorProvider.WELD, "plugin.controller.contextual.simple");
    application.init();
    MockClient client = application.client();
    MockViewBridge request = client.render();
    Assert.assertEquals("__foo__", request.assertStringResponse());
  }

  @Test
  public void testRequest() throws Exception {
    MockApplication<?> application = application(InjectorProvider.GUICE, "plugin.controller.contextual.request");
View Full Code Here

  public void testRequest() throws Exception {
    MockApplication<?> application = application(InjectorProvider.GUICE, "plugin.controller.contextual.request");
    application.init();
    MockClient client = application.client();
    MockViewBridge request = client.render();
    Assert.assertEquals("pass", request.assertStringResponse());
  }
}
View Full Code Here

    MockClient client = app.client();

    //
    MockViewBridge render = client.render("none");
    MockViewBridge mv = (MockViewBridge)client.invoke(render.assertStringResponse());
    assertEquals("", mv.assertStringResponse());

    //
    render = client.render("0");
    mv = (MockViewBridge)client.invoke(render.assertStringResponse());
    assertEquals("", mv.assertStringResponse());
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.