Apply Checkstyle WhitespaceAfterCheck module
This commit is contained in:
+5
-5
@@ -66,7 +66,7 @@ public class Sec2935Tests {
|
||||
@Test
|
||||
public void postProcessorUserNoUser() throws Exception {
|
||||
mvc
|
||||
.perform(get("/admin/abc").with(user("user").roles("ADMIN","USER")))
|
||||
.perform(get("/admin/abc").with(user("user").roles("ADMIN", "USER")))
|
||||
.andExpect(status().isNotFound())
|
||||
.andExpect(authenticated().withUsername("user"));
|
||||
|
||||
@@ -79,7 +79,7 @@ public class Sec2935Tests {
|
||||
@Test
|
||||
public void postProcessorUserOtherUser() throws Exception {
|
||||
mvc
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN","USER")))
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN", "USER")))
|
||||
.andExpect(status().isNotFound())
|
||||
.andExpect(authenticated().withUsername("user1"));
|
||||
|
||||
@@ -93,7 +93,7 @@ public class Sec2935Tests {
|
||||
@Test
|
||||
public void postProcessorUserWithMockUser() throws Exception {
|
||||
mvc
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN","USER")))
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN", "USER")))
|
||||
.andExpect(status().isNotFound())
|
||||
.andExpect(authenticated().withUsername("user1"));
|
||||
|
||||
@@ -112,7 +112,7 @@ public class Sec2935Tests {
|
||||
.build();
|
||||
|
||||
mvc
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN","USER")))
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN", "USER")))
|
||||
.andExpect(status().isNotFound())
|
||||
.andExpect(authenticated().withUsername("user1"));
|
||||
|
||||
@@ -132,7 +132,7 @@ public class Sec2935Tests {
|
||||
.build();
|
||||
|
||||
mvc
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN","USER")))
|
||||
.perform(get("/admin/abc").with(user("user1").roles("ADMIN", "USER")))
|
||||
.andExpect(status().isNotFound())
|
||||
.andExpect(authenticated().withUsername("user1"));
|
||||
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ public class SecurityMockMvcRequestPostProcessorsCsrfTests {
|
||||
|
||||
MockHttpServletRequestBuilder requestWithCsrf = post("/")
|
||||
.param(token.getParameterName(), token.getToken())
|
||||
.session((MockHttpSession)request.getSession());
|
||||
.session((MockHttpSession) request.getSession());
|
||||
this.mockMvc.perform(requestWithCsrf)
|
||||
.andExpect(status().isOk());
|
||||
// @formatter:on
|
||||
|
||||
+1
-1
@@ -28,6 +28,6 @@ import org.springframework.security.test.context.support.WithMockUser;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
@Documented
|
||||
@WithMockUser(value="rob",roles="ADMIN")
|
||||
@WithMockUser(value="rob", roles="ADMIN")
|
||||
public @interface WithAdminRob {
|
||||
}
|
||||
|
||||
+2
-2
@@ -103,8 +103,8 @@ public class WithUserDetailsAuthenticationTests {
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
.withUser("user").password("password").roles("USER").and()
|
||||
.withUser("admin").password("password").roles("USER","ADMIN");
|
||||
.withUser("admin").password("password").roles("USER", "ADMIN");
|
||||
}
|
||||
// @formatter:on
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -103,8 +103,8 @@ public class WithUserDetailsClassLevelAuthenticationTests {
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
.withUser("user").password("password").roles("USER").and()
|
||||
.withUser("admin").password("password").roles("USER","ADMIN");
|
||||
.withUser("admin").password("password").roles("USER", "ADMIN");
|
||||
}
|
||||
// @formatter:on
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user