Support Customizing Observation Conventions

Closes gh-12534
This commit is contained in:
Braunson
2023-03-21 19:58:01 -04:00
committed by Josh Cummings
parent ff4e926111
commit 8d933fcb03
8 changed files with 76 additions and 4 deletions

View File

@@ -93,4 +93,9 @@ public class ObservationAuthenticationManagerTests {
assertThat(context.getAuthenticationResult()).isNull();
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
}
}

View File

@@ -96,4 +96,10 @@ public class ObservationReactiveAuthenticationManagerTests {
assertThat(context.getAuthenticationResult()).isNull();
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
}
}

View File

@@ -118,4 +118,9 @@ public class ObservationAuthorizationManagerTests {
assertThat(context.getDecision()).isEqualTo(this.grant);
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
}
}

View File

@@ -117,4 +117,9 @@ public class ObservationReactiveAuthorizationManagerTests {
assertThat(context.getDecision()).isEqualTo(this.grant);
}
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
}
}