use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testPut.
@Test
public void testPut() {
Response response = makeRequest(Request.PUT().url(testServerUrl().path("/base/middle/app/put")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("put works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testPost.
@Test
public void testPost() {
Response response = makeRequest(Request.POST().url(testServerUrl().path("/base/middle/app/post")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("post works."));
}
use of org.doctester.testbrowser.Response in project ninja by ninjaframework.
the class ApplicationControllerTest method testProdMode.
@Test
public void testProdMode() {
// Server runs in Test mode. This route is Prod.
Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/mode/prod")));
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 testProdMode012.
@Test
public void testProdMode012() {
// Server runs in Test mode. This route is Prod.
Response response = makeRequest(Request.GET().url(testServerUrl().path("/0/1/2/mode/prod")));
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 testProdAndTestMode012.
@Test
public void testProdAndTestMode012() {
// Server runs in Test mode. This route is Prod & Test.
Response response = makeRequest(Request.GET().url(testServerUrl().path("/0/1/2/mode/prod/and/test")));
Assert.assertThat(response.payload, CoreMatchers.equalTo("prod and test works."));
}
Aggregations