This commit is contained in:
Stephane Nicoll
2017-12-12 11:57:24 +01:00
parent 97c91eee94
commit 23218add90
615 changed files with 2832 additions and 3224 deletions

View File

@@ -57,7 +57,7 @@ public class SampleMethodSecurityApplicationTests {
private TestRestTemplate restTemplate;
@Test
public void testHome() throws Exception {
public void testHome() {
HttpHeaders headers = new HttpHeaders();
headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
ResponseEntity<String> entity = this.restTemplate.exchange("/", HttpMethod.GET,
@@ -67,7 +67,7 @@ public class SampleMethodSecurityApplicationTests {
}
@Test
public void testLogin() throws Exception {
public void testLogin() {
HttpHeaders headers = new HttpHeaders();
headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
MultiValueMap<String, String> form = new LinkedMultiValueMap<>();
@@ -82,7 +82,7 @@ public class SampleMethodSecurityApplicationTests {
}
@Test
public void testDenied() throws Exception {
public void testDenied() {
HttpHeaders headers = new HttpHeaders();
headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
MultiValueMap<String, String> form = new LinkedMultiValueMap<>();
@@ -102,7 +102,7 @@ public class SampleMethodSecurityApplicationTests {
}
@Test
public void testManagementProtected() throws Exception {
public void testManagementProtected() {
HttpHeaders headers = new HttpHeaders();
headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
ResponseEntity<String> entity = this.restTemplate.exchange("/actuator/beans",
@@ -111,7 +111,7 @@ public class SampleMethodSecurityApplicationTests {
}
@Test
public void testManagementAuthorizedAccess() throws Exception {
public void testManagementAuthorizedAccess() {
BasicAuthorizationInterceptor basicAuthInterceptor = new BasicAuthorizationInterceptor(
"admin", "admin");
this.restTemplate.getRestTemplate().getInterceptors().add(basicAuthInterceptor);