Package juzu.test.protocol.mock

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


  @Test
  public void testTyped() throws Exception {
    MockApplication<?> app = application("plugin.template.typed").init();
    MockClient client = app.client();
    assertEquals("typed_template", client.render().assertStringResponse());
  }

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


  @Test
  public void testUndeclaredIOE() throws Exception {
    MockApplication<?> app = application("plugin.template.ioe").init();
    MockClient client = app.client();
    assertEquals("pass", client.render().assertStringResponse());
  }

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

  @Test
  public void testMessage() throws Exception {
    MockApplication<?> app = application("plugin.template.message").init();
    app.addMessage(Locale.ENGLISH, "the_key", "the_key_en");
    MockClient client = app.client();
    assertEquals("(the_key_en,)", client.render().assertStringResponse());
  }

  @Test
  public void testPrecompileGroovy() throws Exception {
    MockApplication<File> app = application("plugin.template.simple").init();
View Full Code Here

    CompilationUnit cu = new CompilationUnit(config);
    cu.addSource(groovy);
    cu.compile();
    assertTrue(groovy.delete());
    MockClient client = app.client();
    assertEquals("hello", client.render().assertStringResponse());
  }
}
View Full Code Here

  @Test
  public void testContextutal() throws Exception {
    MockApplication<?> app = application(InjectorProvider.WELD, "plugin.template.url.contextual").init();
    MockClient client = app.client();
    String url = client.render().assertStringResponse();
    assertEquals("pass", ((MockViewBridge)client.invoke(url)).assertStringResponse());
  }
}
View Full Code Here

    //
    MockClient client = app.client();

    //
    MockRequestBridge request = client.render();
    List<Scoped> attributes = request.getAttributesHistory();
    assertEquals(1, attributes.size());
    Identifiable car = (Identifiable)attributes.iterator().next().get();
    assertEquals(Identifiable.DESTROYED, car.getStatus());
View Full Code Here

    writer.close();
    app.init();

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

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

  public void testProvider() throws Exception {
    MockApplication<?> app = application("plugin.binding.provider.create").init();

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

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

  public void testQualifiedProvider() throws Exception {
    MockApplication<?> app = application("plugin.binding.provider.qualified").init();

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

  public void testCreate() throws Exception {
    MockApplication<?> app = application("plugin.binding.implementation.create").init();

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