cleanup work
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
package org.baeldung.client;
|
||||
|
||||
import static org.baeldung.Consts.APPLICATION_PORT;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
public class RestTemplateBasicLiveTest {
|
||||
|
||||
private RestTemplate restTemplate;
|
||||
private static final String fooResourceUrl = "http://localhost:" + APPLICATION_PORT + "/spring-security-rest-full/auth/foos";
|
||||
|
||||
@Before
|
||||
public void beforeTest() {
|
||||
restTemplate = new RestTemplate();
|
||||
}
|
||||
|
||||
// GET
|
||||
|
||||
@Test
|
||||
public void givenResourceUrl_whenSendGetForRequestEntity_thenStatusOk() throws IOException {
|
||||
final ResponseEntity<String> response = restTemplate.getForEntity(fooResourceUrl, String.class);
|
||||
|
||||
assertThat(response.getStatusCode(), equalTo(HttpStatus.OK));
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -4,8 +4,8 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.baeldung.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import org.junit.Test;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ import static org.springframework.security.test.web.servlet.request.SecurityMock
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.baeldung.security.spring.SecurityWithCsrfConfig;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import org.junit.Test;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.security.csrf;
|
||||
package org.baeldung.security.spring;
|
||||
|
||||
import org.baeldung.web.error.CustomAccessDeniedHandler;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
+1
-1
@@ -3,8 +3,8 @@ package org.baeldung.web.interceptor;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.baeldung.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
+1
-1
@@ -5,8 +5,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.baeldung.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package org.baeldung.web.interceptor;
|
||||
|
||||
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.baeldung.spring.SecurityWithoutCsrfConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
Reference in New Issue
Block a user