Polish
This commit is contained in:
@@ -57,24 +57,24 @@ public class SampleSecureApplicationTests {
|
||||
}
|
||||
|
||||
@Test(expected = AuthenticationException.class)
|
||||
public void secure() throws Exception {
|
||||
public void secure() {
|
||||
assertThat("Hello Security").isEqualTo(this.service.secure());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void authenticated() throws Exception {
|
||||
public void authenticated() {
|
||||
SecurityContextHolder.getContext().setAuthentication(this.authentication);
|
||||
assertThat("Hello Security").isEqualTo(this.service.secure());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void preauth() throws Exception {
|
||||
public void preauth() {
|
||||
SecurityContextHolder.getContext().setAuthentication(this.authentication);
|
||||
assertThat("Hello World").isEqualTo(this.service.authorized());
|
||||
}
|
||||
|
||||
@Test(expected = AccessDeniedException.class)
|
||||
public void denied() throws Exception {
|
||||
public void denied() {
|
||||
SecurityContextHolder.getContext().setAuthentication(this.authentication);
|
||||
assertThat("Goodbye World").isEqualTo(this.service.denied());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user