Skip to content

Commit

Permalink
#40: Polish JUnit4TestDescriptor
Browse files Browse the repository at this point in the history
------------------------------------------------------------------------
On behalf of the community, the JUnit Lambda Team thanks Klarna AB
(http://www.klarna.com) for supporting the JUnit crowdfunding campaign!
------------------------------------------------------------------------
  • Loading branch information
marcphilipp committed Jan 8, 2016
1 parent cecf3ee commit 0f6a849
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -61,7 +61,7 @@ public Set<TestTag> getTags() {
Set<TestTag> result = new LinkedHashSet<>(); Set<TestTag> result = new LinkedHashSet<>();
getParent().ifPresent(parent -> result.addAll(parent.getTags())); getParent().ifPresent(parent -> result.addAll(parent.getTags()));
// @formatter:off // @formatter:off
getDirectCategories().ifPresent(categoryClasses -> getDeclaredCategories().ifPresent(categoryClasses ->
stream(categoryClasses) stream(categoryClasses)
.map(ReflectionUtils::getAllAssignmentCompatibleClasses) .map(ReflectionUtils::getAllAssignmentCompatibleClasses)
.flatMap(Collection::stream) .flatMap(Collection::stream)
Expand All @@ -74,7 +74,7 @@ public Set<TestTag> getTags() {
return result; return result;
} }


private Optional<Class<?>[]> getDirectCategories() { private Optional<Class<?>[]> getDeclaredCategories() {
Category annotation = description.getAnnotation(Category.class); Category annotation = description.getAnnotation(Category.class);
return Optional.ofNullable(annotation).map(Category::value); return Optional.ofNullable(annotation).map(Category::value);
} }
Expand Down

0 comments on commit 0f6a849

Please sign in to comment.