Examples of assertStringResponse()


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

    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

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockResourceBridge resource = (MockResourceBridge)client.invoke(render.assertStringResponse());
    resource.assertNotFound();
  }

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

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockResourceBridge resource = (MockResourceBridge)client.invoke(render.assertStringResponse());
    assertEquals("hello", new String(resource.assertBinaryResponse(), "UTF-8"));
    assertEquals("application/octet-stream", resource.getMimeType());
  }
}
View Full Code Here

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockActionBridge action = (MockActionBridge)client.invoke(render.assertStringResponse());
    action.assertNoResponse();
  }

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

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockActionBridge action = (MockActionBridge)client.invoke(render.assertStringResponse());
    action.assertRedirect("http://www.julienviet.com");
  }

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

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    MockActionBridge action = (MockActionBridge)client.invoke(render.assertStringResponse());
    action.assertRender("render", Collections.singletonMap("arg", "arg_value"));
  }
}
View Full Code Here

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

    MockApplication<?> app = application("plugin.template.el").init();

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

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

    MockApplication<?> app = application(di, "plugin.template.ambiguous.app1").init();

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

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

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

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

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

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

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

    //
    MockClient client = app.client();
    MockViewBridge render = client.render();
    String result = render.assertStringResponse();
    Matcher m = P.matcher(result);
    assertTrue("Was expecting " + result + " to match", m.matches());
    assertEquals("0", m.group(1));
    render = (MockViewBridge)client.invoke(m.group(2));
    m.reset(result = 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.