Fix tests using root cause for exception messages

Closes gh-11372
This commit is contained in:
Steve Riesenberg
2022-06-14 15:42:43 -05:00
parent d98dab5917
commit c7df39a3e6
12 changed files with 30 additions and 18 deletions

View File

@@ -77,7 +77,7 @@ public class EmbeddedLdapServerContextSourceFactoryBeanITests {
public void contextSourceFactoryBeanWhenManagerDnAndNoPasswordThenException() {
assertThatExceptionOfType(UnsatisfiedDependencyException.class)
.isThrownBy(() -> this.spring.register(CustomManagerDnNoPasswordConfig.class).autowire())
.withRootCauseInstanceOf(IllegalStateException.class)
.havingRootCause().isInstanceOf(IllegalStateException.class)
.withMessageContaining("managerPassword is required if managerDn is supplied");
}