Search in sources :

Example 6 with Response

use of org.doctester.testbrowser.Response in project ninja by ninjaframework.

the class ApplicationControllerTest method testDevAndTestMode012.

@Test
public void testDevAndTestMode012() {
    // Server runs in Test mode. This route is Dev & Test.
    Response response = makeRequest(Request.GET().url(testServerUrl().path("/0/1/2/mode/dev/and/test")));
    Assert.assertThat(response.payload, CoreMatchers.equalTo("dev and test works."));
}
Also used : Response(org.doctester.testbrowser.Response) Test(org.junit.Test)

Example 7 with Response

use of org.doctester.testbrowser.Response in project ninja by ninjaframework.

the class ApplicationControllerTest method testDelete.

@Test
public void testDelete() {
    Response response = makeRequest(Request.DELETE().url(testServerUrl().path("/base/middle/app/delete")));
    Assert.assertThat(response.payload, CoreMatchers.equalTo("delete works."));
}
Also used : Response(org.doctester.testbrowser.Response) Test(org.junit.Test)

Example 8 with Response

use of org.doctester.testbrowser.Response in project ninja by ninjaframework.

the class ApplicationControllerTest method testPost012.

@Test
public void testPost012() {
    Response response = makeRequest(Request.POST().url(testServerUrl().path("/0/1/2/post")));
    Assert.assertThat(response.payload, CoreMatchers.equalTo("post works."));
}
Also used : Response(org.doctester.testbrowser.Response) Test(org.junit.Test)

Example 9 with Response

use of org.doctester.testbrowser.Response in project ninja by ninjaframework.

the class ApplicationControllerTest method testPut012.

@Test
public void testPut012() {
    Response response = makeRequest(Request.PUT().url(testServerUrl().path("/0/1/2/put")));
    Assert.assertThat(response.payload, CoreMatchers.equalTo("put works."));
}
Also used : Response(org.doctester.testbrowser.Response) Test(org.junit.Test)

Example 10 with Response

use of org.doctester.testbrowser.Response in project ninja by ninjaframework.

the class ApplicationControllerTest method testDevAndTestMode.

@Test
public void testDevAndTestMode() {
    // Server runs in Test mode. This route is Dev & Test.
    Response response = makeRequest(Request.GET().url(testServerUrl().path("/base/middle/app/mode/dev/and/test")));
    Assert.assertThat(response.payload, CoreMatchers.equalTo("dev and test works."));
}
Also used : Response(org.doctester.testbrowser.Response) Test(org.junit.Test)

Aggregations

Response (org.doctester.testbrowser.Response)23 Test (org.junit.Test)23 Message (ninja.utils.Message)2 Article (models.Article)1 ArticleDto (models.ArticleDto)1 ArticlesDto (models.ArticlesDto)1