Browse Source

Polishing

pull/22755/head
Phillip Webb 7 years ago
parent
commit
ef151f578d
  1. 8
      spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java
  2. 4
      spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java

8
spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java

@ -227,23 +227,23 @@ public class AnnotatedElementUtilsTests {
* If the "value" entry contains both "DerivedTxConfig" AND "TxConfig", then * If the "value" entry contains both "DerivedTxConfig" AND "TxConfig", then
* the algorithm is accidentally picking up shadowed annotations of the same * the algorithm is accidentally picking up shadowed annotations of the same
* type within the class hierarchy. Such undesirable behavior would cause the * type within the class hierarchy. Such undesirable behavior would cause the
* logic in {@link org.springframework.context.annotation.ProfileCondition} * logic in {@code org.springframework.context.annotation.ProfileCondition}
* to fail. * to fail.
* @see org.springframework.core.env.EnvironmentSystemIntegrationTests#mostSpecificDerivedClassDrivesEnvironment_withDevEnvAndDerivedDevConfigClass
*/ */
@Test @Test
public void getAllAnnotationAttributesOnClassWithLocalAnnotationThatShadowsAnnotationFromSuperclass() { public void getAllAnnotationAttributesOnClassWithLocalAnnotationThatShadowsAnnotationFromSuperclass() {
// See org.springframework.core.env.EnvironmentSystemIntegrationTests#mostSpecificDerivedClassDrivesEnvironment_withDevEnvAndDerivedDevConfigClass
MultiValueMap<String, Object> attributes = getAllAnnotationAttributes(DerivedTxConfig.class, TX_NAME); MultiValueMap<String, Object> attributes = getAllAnnotationAttributes(DerivedTxConfig.class, TX_NAME);
assertNotNull("Annotation attributes map for @Transactional on DerivedTxConfig", attributes); assertNotNull("Annotation attributes map for @Transactional on DerivedTxConfig", attributes);
assertEquals("value for DerivedTxConfig", asList("DerivedTxConfig"), attributes.get("value")); assertEquals("value for DerivedTxConfig", asList("DerivedTxConfig"), attributes.get("value"));
} }
/** /**
* Note: this functionality is required by {@link org.springframework.context.annotation.ProfileCondition}. * Note: this functionality is required by {@code org.springframework.context.annotation.ProfileCondition}.
* @see org.springframework.core.env.EnvironmentSystemIntegrationTests
*/ */
@Test @Test
public void getAllAnnotationAttributesOnClassWithMultipleComposedAnnotations() { public void getAllAnnotationAttributesOnClassWithMultipleComposedAnnotations() {
// See org.springframework.core.env.EnvironmentSystemIntegrationTests
MultiValueMap<String, Object> attributes = getAllAnnotationAttributes(TxFromMultipleComposedAnnotations.class, TX_NAME); MultiValueMap<String, Object> attributes = getAllAnnotationAttributes(TxFromMultipleComposedAnnotations.class, TX_NAME);
assertNotNull("Annotation attributes map for @Transactional on TxFromMultipleComposedAnnotations", attributes); assertNotNull("Annotation attributes map for @Transactional on TxFromMultipleComposedAnnotations", attributes);
assertEquals("value for TxFromMultipleComposedAnnotations.", asList("TxInheritedComposed", "TxComposed"), assertEquals("value for TxFromMultipleComposedAnnotations.", asList("TxInheritedComposed", "TxComposed"),

4
spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java

@ -196,7 +196,7 @@ public class MergedAnnotationsTests {
* the algorithm is accidentally picking up shadowed annotations of the same * the algorithm is accidentally picking up shadowed annotations of the same
* type within the class hierarchy. Such undesirable behavior would cause * type within the class hierarchy. Such undesirable behavior would cause
* the logic in * the logic in
* {@link org.springframework.context.annotation.ProfileCondition} to fail. * {@code org.springframework.context.annotation.ProfileCondition} to fail.
*/ */
@Test @Test
public void collectMultiValueMapFromClassWithLocalAnnotationThatShadowsAnnotationFromSuperclass() { public void collectMultiValueMapFromClassWithLocalAnnotationThatShadowsAnnotationFromSuperclass() {
@ -208,7 +208,7 @@ public class MergedAnnotationsTests {
/** /**
* Note: this functionality is required by * Note: this functionality is required by
* {@link org.springframework.context.annotation.ProfileCondition}. * {@code org.springframework.context.annotation.ProfileCondition}.
*/ */
@Test @Test
public void collectMultiValueMapFromClassWithMultipleComposedAnnotations() { public void collectMultiValueMapFromClassWithMultipleComposedAnnotations() {

Loading…
Cancel
Save