Skip to content

Commit 78ff4ff

Browse files
committed
Polish AnnotationUtilsTests
1 parent f3da7b8 commit 78ff4ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ public void synthesizeAnnotationWithAttributeAliasForAttributeOfDifferentType()
801801
public void synthesizeAnnotationWithAttributeAliasForWithMissingDefaultValues() throws Exception {
802802
AliasForWithMissingDefaultValues annotation =
803803
AliasForWithMissingDefaultValuesClass.class.getAnnotation(AliasForWithMissingDefaultValues.class);
804+
exception.expect(AnnotationConfigurationException.class);
804805
exception.expectMessage(startsWith("Misconfigured aliases"));
805806
exception.expectMessage(containsString(AliasForWithMissingDefaultValues.class.getName()));
806807

@@ -817,6 +818,7 @@ public void synthesizeAnnotationWithAttributeAliasForWithMissingDefaultValues()
817818
public void synthesizeAnnotationWithAttributeAliasForAttributeWithDifferentDefaultValue() throws Exception {
818819
AliasForAttributeWithDifferentDefaultValue annotation =
819820
AliasForAttributeWithDifferentDefaultValueClass.class.getAnnotation(AliasForAttributeWithDifferentDefaultValue.class);
821+
exception.expect(AnnotationConfigurationException.class);
820822
exception.expectMessage(startsWith("Misconfigured aliases"));
821823
exception.expectMessage(containsString(AliasForAttributeWithDifferentDefaultValue.class.getName()));
822824

0 commit comments

Comments
 (0)