small fixes to match articles

This commit is contained in:
Loredana
2019-03-17 12:26:00 +02:00
parent b7c1092460
commit f62a8d0f70
15 changed files with 51 additions and 45 deletions
@@ -1,5 +1,5 @@
package com.baeldung;
public interface Consts {
int APPLICATION_PORT = 8082;
int APPLICATION_PORT = 8080;
}
@@ -59,7 +59,7 @@ public abstract class AbstractLiveTest<T extends Serializable> {
//
protected String getURL() {
return "http://localhost:" + APPLICATION_PORT + "/spring-boot-rest/auth/foos";
return "http://localhost:" + APPLICATION_PORT + "/spring-boot-rest/foos";
}
}
@@ -27,7 +27,7 @@ public class FooControllerAppIntegrationTest {
@Test
public void whenFindPaginatedRequest_thenEmptyResponse() throws Exception {
this.mockMvc.perform(get("/auth/foos").param("page", "0")
this.mockMvc.perform(get("/foos").param("page", "0")
.param("size", "2"))
.andExpect(status().isOk())
.andExpect(content().json("[]"));
@@ -29,7 +29,7 @@ public class FooControllerCustomEtagIntegrationTest {
@Autowired
private MockMvc mvc;
private String FOOS_ENDPOINT = "/auth/foos/";
private String FOOS_ENDPOINT = "/foos/";
private String CUSTOM_ETAG_ENDPOINT_SUFFIX = "/custom-etag";
private static String serializeFoo(Foo foo) throws Exception {
@@ -51,7 +51,7 @@ public class FooControllerWebLayerIntegrationTest {
doNothing().when(publisher)
.publishEvent(any(PaginatedResultsRetrievedEvent.class));
this.mockMvc.perform(get("/auth/foos").param("page", "0")
this.mockMvc.perform(get("/foos").param("page", "0")
.param("size", "2"))
.andExpect(status().isOk())
.andExpect(jsonPath("$",Matchers.hasSize(1)));
@@ -74,7 +74,7 @@ public class FooPageableLiveTest extends AbstractBasicLiveTest<Foo> {
}
protected String getPageableURL() {
return "http://localhost:" + APPLICATION_PORT + "/spring-boot-rest/auth/foos/pageable";
return "http://localhost:" + APPLICATION_PORT + "/spring-boot-rest/foos/pageable";
}
}
@@ -42,15 +42,14 @@
"raw": "{\n \"name\": \"Transformers\"\n}"
},
"url": {
"raw": "http://localhost:8082/spring-boot-rest/auth/foos",
"raw": "http://localhost:8080/spring-boot-rest/foos",
"protocol": "http",
"host": [
"localhost"
],
"port": "8082",
"port": "8080",
"path": [
"spring-boot-rest",
"auth",
"foos"
]
}
@@ -85,15 +84,14 @@
"raw": ""
},
"url": {
"raw": "http://localhost:8082/spring-boot-rest/auth/foos/{{id}}",
"raw": "http://localhost:8080/spring-boot-rest/foos/{{id}}",
"protocol": "http",
"host": [
"localhost"
],
"port": "8082",
"port": "8080",
"path": [
"spring-boot-rest",
"auth",
"foos",
"{{id}}"
]
@@ -123,15 +121,14 @@
"raw": ""
},
"url": {
"raw": "http://localhost:8082/spring-boot-rest/auth/foos/{{id}}",
"raw": "http://localhost:8080/spring-boot-rest/foos/{{id}}",
"protocol": "http",
"host": [
"localhost"
],
"port": "8082",
"port": "8080",
"path": [
"spring-boot-rest",
"auth",
"foos",
"{{id}}"
]
@@ -164,15 +161,14 @@
"raw": ""
},
"url": {
"raw": "http://localhost:8082/spring-boot-rest/auth/foos/{{id}}",
"raw": "http://localhost:8080/spring-boot-rest/foos/{{id}}",
"protocol": "http",
"host": [
"localhost"
],
"port": "8082",
"port": "8080",
"path": [
"spring-boot-rest",
"auth",
"foos",
"{{id}}"
]