BAEL-6223 : ul (CONFIGURATION)
Anonymous test methods naming
This commit is contained in:
@@ -38,7 +38,7 @@ class MessageServiceUnitTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsNotAuthenticated_whenGreet_thenThrowsClassCastException() {
|
||||
void givenUserIsAnonymous_whenGreet_thenThrowsClassCastException() {
|
||||
assertThrows(ClassCastException.class, () -> messageService.greet()
|
||||
.block());
|
||||
}
|
||||
@@ -64,7 +64,7 @@ class MessageServiceUnitTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsNotAuthenticated_whenGetSecret_thenThrowsAccessDeniedException() {
|
||||
void givenUserIsAnonymous_whenGetSecret_thenThrowsAccessDeniedException() {
|
||||
assertThrows(AccessDeniedException.class, () -> messageService.getSecret()
|
||||
.block());
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class ReactiveResourceServerApplicationIntegrationTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsAnonymous_whenGetGreet_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetGreet_thenUnauthorized() throws Exception {
|
||||
api.get()
|
||||
.uri("/greet")
|
||||
.exchange()
|
||||
@@ -51,7 +51,7 @@ class ReactiveResourceServerApplicationIntegrationTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsAnonymous_whenGetSecuredRoute_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetSecuredRoute_thenUnauthorized() throws Exception {
|
||||
api.get()
|
||||
.uri("/secured-route")
|
||||
.exchange()
|
||||
@@ -88,7 +88,7 @@ class ReactiveResourceServerApplicationIntegrationTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsAnonymous_whenGetSecuredMethod_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetSecuredMethod_thenUnauthorized() throws Exception {
|
||||
api.get()
|
||||
.uri("/secured-method")
|
||||
.exchange()
|
||||
|
||||
@@ -34,7 +34,7 @@ class SpringAddonsGreetingControllerUnitTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsAnonymous_whenGetGreet_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetGreet_thenUnauthorized() throws Exception {
|
||||
api.get()
|
||||
.uri("/greet")
|
||||
.exchange()
|
||||
@@ -66,7 +66,7 @@ class SpringAddonsGreetingControllerUnitTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsAnonymous_whenGetSecuredRoute_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetSecuredRoute_thenUnauthorized() throws Exception {
|
||||
api.get()
|
||||
.uri("/secured-route")
|
||||
.exchange()
|
||||
@@ -106,7 +106,7 @@ class SpringAddonsGreetingControllerUnitTest {
|
||||
|
||||
@Test
|
||||
@WithAnonymousUser
|
||||
void givenUserIsAnonymous_whenGetSecuredMethod_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetSecuredMethod_thenUnauthorized() throws Exception {
|
||||
api.get()
|
||||
.uri("/secured-method")
|
||||
.exchange()
|
||||
|
||||
@@ -39,7 +39,7 @@ class SpringSecurityTestGreetingControllerUnitTest {
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
||||
@Test
|
||||
void givenUserIsAnonymous_whenGetGreet_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetGreet_thenUnauthorized() throws Exception {
|
||||
api.mutateWith(mockAuthentication(ANONYMOUS_AUTHENTICATION))
|
||||
.get()
|
||||
.uri("/greet")
|
||||
@@ -72,7 +72,7 @@ class SpringSecurityTestGreetingControllerUnitTest {
|
||||
/*---------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@Test
|
||||
void givenUserIsAnonymous_whenGetSecuredRoute_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetSecuredRoute_thenUnauthorized() throws Exception {
|
||||
api.mutateWith(mockAuthentication(ANONYMOUS_AUTHENTICATION))
|
||||
.get()
|
||||
.uri("/secured-route")
|
||||
@@ -112,7 +112,7 @@ class SpringSecurityTestGreetingControllerUnitTest {
|
||||
/*---------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@Test
|
||||
void givenUserIsAnonymous_whenGetSecuredMethod_thenUnauthorized() throws Exception {
|
||||
void givenRequestIsAnonymous_whenGetSecuredMethod_thenUnauthorized() throws Exception {
|
||||
api.mutateWith(mockAuthentication(ANONYMOUS_AUTHENTICATION))
|
||||
.get()
|
||||
.uri("/secured-method")
|
||||
|
||||
Reference in New Issue
Block a user