Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -52,7 +52,7 @@ import static org.junit.Assert.*;
|
||||
public class AnnotationMetadataTests {
|
||||
|
||||
@Test
|
||||
public void standardAnnotationMetadata() throws Exception {
|
||||
public void standardAnnotationMetadata() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(AnnotatedComponent.class, true);
|
||||
doTestAnnotationInfo(metadata);
|
||||
doTestMethodAnnotationInfo(metadata);
|
||||
@@ -68,7 +68,7 @@ public class AnnotationMetadataTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void standardAnnotationMetadataForSubclass() throws Exception {
|
||||
public void standardAnnotationMetadataForSubclass() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(AnnotatedComponentSubClass.class, true);
|
||||
doTestSubClassAnnotationInfo(metadata);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class AnnotationMetadataTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void standardAnnotationMetadataForInterface() throws Exception {
|
||||
public void standardAnnotationMetadataForInterface() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(AnnotationMetadata.class, true);
|
||||
doTestMetadataForInterfaceClass(metadata);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class AnnotationMetadataTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void standardAnnotationMetadataForAnnotation() throws Exception {
|
||||
public void standardAnnotationMetadataForAnnotation() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(Component.class, true);
|
||||
doTestMetadataForAnnotationClass(metadata);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public class AnnotationMetadataTests {
|
||||
* 'true' as is done in the main test above.
|
||||
*/
|
||||
@Test
|
||||
public void standardAnnotationMetadata_nestedAnnotationsAsMap_false() throws Exception {
|
||||
public void standardAnnotationMetadata_nestedAnnotationsAsMap_false() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(AnnotatedComponent.class);
|
||||
AnnotationAttributes specialAttrs = (AnnotationAttributes) metadata.getAnnotationAttributes(SpecialAttr.class.getName());
|
||||
Annotation[] nestedAnnoArray = (Annotation[]) specialAttrs.get("nestedAnnoArray");
|
||||
@@ -205,19 +205,13 @@ public class AnnotationMetadataTests {
|
||||
assertThat("length of basePackageClasses[]", basePackageClasses.length, is(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* https://jira.spring.io/browse/SPR-11649
|
||||
*/
|
||||
@Test
|
||||
@Test // SPR-11649
|
||||
public void multipleAnnotationsWithIdenticalAttributeNamesUsingStandardAnnotationMetadata() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(NamedAnnotationsClass.class);
|
||||
assertMultipleAnnotationsWithIdenticalAttributeNames(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://jira.spring.io/browse/SPR-11649
|
||||
*/
|
||||
@Test
|
||||
@Test // SPR-11649
|
||||
public void multipleAnnotationsWithIdenticalAttributeNamesUsingAnnotationMetadataReadingVisitor() throws Exception {
|
||||
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory();
|
||||
MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(NamedAnnotationsClass.class.getName());
|
||||
@@ -225,19 +219,13 @@ public class AnnotationMetadataTests {
|
||||
assertMultipleAnnotationsWithIdenticalAttributeNames(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://jira.spring.io/browse/SPR-11649
|
||||
*/
|
||||
@Test
|
||||
@Test // SPR-11649
|
||||
public void composedAnnotationWithMetaAnnotationsWithIdenticalAttributeNamesUsingStandardAnnotationMetadata() {
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(NamedComposedAnnotationClass.class);
|
||||
assertMultipleAnnotationsWithIdenticalAttributeNames(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://jira.spring.io/browse/SPR-11649
|
||||
*/
|
||||
@Test
|
||||
@Test // SPR-11649
|
||||
public void composedAnnotationWithMetaAnnotationsWithIdenticalAttributeNamesUsingAnnotationMetadataReadingVisitor() throws Exception {
|
||||
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory();
|
||||
MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(NamedComposedAnnotationClass.class.getName());
|
||||
|
||||
Reference in New Issue
Block a user