Package juzu.test.protocol.mock

Examples of juzu.test.protocol.mock.MockViewBridge


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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String result = render.assertStringResponse();
    MockActionBridge action = (MockActionBridge)client.invoke(result);
    action.assertRender("A.done", Collections.<String, String>emptyMap());
  }
View Full Code Here


  @Test
  public void testFailureEnd() throws Exception {
    MockApplication<?> app = application("plugin.controller.lifecycle.failureend").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    render.assertFailure(ConcurrentModificationException.class);
    Integer count = Registry.get("count");
    assertEquals((Integer)2, 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);
  }
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);
  }
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);
  }
View Full Code Here

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

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

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

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String url = render.assertStringResponse();
    assertEquals("the_title", render.getTitle());
    render = (MockViewBridge)client.invoke(url);
    assertEquals("4", render.getTitle());
  }
View Full Code Here

    if (getDI() != InjectorProvider.GUICE) {
      MockApplication<?> app = application("plugin.template.tag.param").init();

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

  @Test
  public void testSimpleRender() throws Exception {
    MockApplication<?> app = application("plugin.template.tag.simple.render").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String out = render.assertStringResponse();
    assertEquals("foothe_tagbar", out);
  }
View Full Code Here

TOP

Related Classes of juzu.test.protocol.mock.MockViewBridge

Copyright © 2018 www.massapicom. 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.