Polish ObservationConvention Configuration

Change to setObservationConvention so that it reads more clearly
when used, for example `authenticationManager.setObservationConvention`
is clearer than `authenticationManager.setConvention`.

Change unit test names to follow team conventions.

Issue gh-12534
This commit is contained in:
Josh Cummings
2023-03-28 12:20:24 -06:00
parent f1b14de3ba
commit 607e40d366
8 changed files with 16 additions and 12 deletions

View File

@@ -94,8 +94,9 @@ public class ObservationAuthenticationManagerTests {
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
void setObservationConventionWhenNullThenException() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setObservationConvention(null));
}
}

View File

@@ -97,8 +97,9 @@ public class ObservationReactiveAuthenticationManagerTests {
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
void setObservationConventionWhenNullThenException() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setObservationConvention(null));
}
}

View File

@@ -119,8 +119,9 @@ public class ObservationAuthorizationManagerTests {
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
void setObservationConventionWhenNullThenException() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setObservationConvention(null));
}
}

View File

@@ -118,8 +118,9 @@ public class ObservationReactiveAuthorizationManagerTests {
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
void setObservationConventionWhenNullThenException() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setObservationConvention(null));
}
}