private List<TestTag> getTags(Class<?> testClass) { List<TestTag> tags = new ArrayList<>(); if (testClass == null) { return NO_TAGS; } addTagValues(tags, testClass.getAnnotation(WithTagValuesOf.class)); addTags(tags, testClass.getAnnotation(WithTags.class)); addTag(tags, testClass.getAnnotation(WithTag.class)); if (testClass.getSuperclass() != Object.class) { tags.addAll(getTags(testClass.getSuperclass())); } return tags; }
private List<TestTag> getTags(Class<?> testClass) { List<TestTag> tags = new ArrayList<>(); if (testClass != null) { addTagValues(tags, testClass.getAnnotation(WithTagValuesOf.class)); addTags(tags, testClass.getAnnotation(WithTags.class)); addTag(tags, testClass.getAnnotation(WithTag.class)); } if (testClass.getSuperclass() != Object.class) { tags.addAll(getTags(testClass.getSuperclass())); } return tags; }
private List<TestTag> getTagsFor(String methodName) { List<TestTag> tags = new ArrayList<>(); java.util.Optional<Method> testMethod = getMethodCalled(methodName); if (testMethod.isPresent()) { addTagValues(tags, testMethod.get().getAnnotation(WithTagValuesOf.class)); addTags(tags, testMethod.get().getAnnotation(WithTags.class)); addTag(tags, testMethod.get().getAnnotation(WithTag.class)); } return tags; }
private List<TestTag> getTags(Class<?> testClass) { List<TestTag> tags = new ArrayList<>(); if (testClass != null) { addTagValues(tags, testClass.getAnnotation(WithTagValuesOf.class)); addTags(tags, testClass.getAnnotation(WithTags.class)); addTag(tags, testClass.getAnnotation(WithTag.class)); } if (testClass.getSuperclass() != Object.class) { tags.addAll(getTags(testClass.getSuperclass())); } return tags; }
private List<TestTag> getTagsFor(String methodName) { List<TestTag> tags = new ArrayList<TestTag>(); Optional<Method> testMethod = getMethodCalled(methodName); if (testMethod.isPresent()) { addTagValues(tags, testMethod.get().getAnnotation(WithTagValuesOf.class)); addTags(tags, testMethod.get().getAnnotation(WithTags.class)); addTag(tags, testMethod.get().getAnnotation(WithTag.class)); } return tags; }
private List<TestTag> getTagsFor(String methodName) { List<TestTag> tags = new ArrayList<TestTag>(); Optional<Method> testMethod = getMethodCalled(methodName); if (testMethod.isPresent()) { addTagValues(tags, testMethod.get().getAnnotation(WithTagValuesOf.class)); addTags(tags, testMethod.get().getAnnotation(WithTags.class)); addTag(tags, testMethod.get().getAnnotation(WithTag.class)); } return tags; }