Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable @AnalyzeClasses annotation to be used as meta annotation #1300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mathze
Copy link

@mathze mathze commented May 6, 2024

so far users are forced to repeat @AnalyzeClasses annotation an every test class. This cause additional maintenance overhead when common properties (e.g. package structure) changes. To support the DRY approach, @AnalzyeClasses annotation can now be used as meta annotation.

Resolves: #182

so far users are forced to repeat `@AnalyzeClasses` annotation an every test class.
This cause additional maintenance overhead when common properties (e.g. package structure) changes.
To support the DRY approach, `@AnalzyeClasses` annotation can now be used as meta annotation.

Resolves: TNG#182
Signed-off-by: Mathze <270275+mathze@users.noreply.github.com>
@mathze mathze force-pushed the feature/GH-182-allow-analyzeclass-to-be-used-as-meta-annotation branch from 253c79e to f28257a Compare May 11, 2024 12:20
@@ -295,11 +300,14 @@ private static class JUnit5ClassAnalysisRequest implements ClassAnalysisRequest
}

private static AnalyzeClasses checkAnnotation(Class<?> testClass) {
AnalyzeClasses analyzeClasses = testClass.getAnnotation(AnalyzeClasses.class);
checkArgument(analyzeClasses != null,
List<AnalyzeClasses> analyzeClasses = new AnnotationFinder<>(AnalyzeClasses.class).findAnnotationsOn(testClass);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to reach this from test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow @AnalyzeClasses to be used as a meta annotation
1 participant