Harmonize NoUniqueBeanDefinitionException message
This commit makes sure that the programmatic exception that is thrown by the cache abstraction uses the same message structure as a default message produced by NoUniqueBeanDefinitionException. Closes gh-33305
This commit is contained in:
@@ -95,7 +95,9 @@ class AspectJEnableCachingIsolatedTests {
|
||||
}
|
||||
catch (NoUniqueBeanDefinitionException ex) {
|
||||
assertThat(ex.getMessage()).contains(
|
||||
"no CacheResolver specified and expected a single CacheManager bean, but found 2: [cm1,cm2]");
|
||||
"no CacheResolver specified and expected single matching CacheManager but found 2: cm1,cm2");
|
||||
assertThat(ex.getNumberOfBeansFound()).isEqualTo(2);
|
||||
assertThat(ex.getBeanNamesFound()).containsExactly("cm1", "cm2");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user