use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testTestModeIndex.
@Test
public void testTestModeIndex() {
Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/mode/test")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("test mode works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testGet012.
@Test
public void testGet012() {
Response response = makeRequest(Request.GET().url(testServerUrl().path("/0/1/2/get")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("get works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class NotFoundTest method testThatNotFoundWorksJson.
@Test
public void testThatNotFoundWorksJson() {
Response response = makeRequest(Request.GET().url(testServerUrl().path("/_non_existing_url")).addHeader(HttpConstants.HEADER_ACCEPT, HttpConstants.APPLICATION_JSON));
assertEquals(404, response.httpStatus);
Message message = response.payloadJsonAs(Message.class);
Assert.assertThat(message.text, CoreMatchers.equalTo(NinjaConstant.I18N_NINJA_SYSTEM_NOT_FOUND_TEXT_DEFAULT));
}
Aggregations