use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testGet.
@Test
public void testGet() {
Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/get")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("get works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testProdAndTestMode.
@Test
public void testProdAndTestMode() {
// Server runs in Test mode. This route is Prod & Test.
Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/mode/prod/and/test")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("prod and test works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testDevModeIndexMissing.
@Test
public void testDevModeIndexMissing() {
// Server runs in Test mode making pure "dev" routes unavailable
Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/mode/dev")));
Assert.assertThat(response.httpStatus, CoreMatchers.equalTo(Result.SC_404_NOT_FOUND));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testWithoutMethodPath.
@Test
public void testWithoutMethodPath() throws Exception {
Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("route without method path works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testDelete012.
@Test
public void testDelete012() {
Response response = makeRequest(Request.DELETE().url(testServerUrl().path("/0/1/2/delete")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("delete works."));
}
Aggregations