IncludeCategory and ExcludeCategory should have plural in descriptive method value(): [] #336

Tibor17 opened this Issue Oct 10, 2011 · 2 comments


None yet

2 participants

Tibor17 commented Oct 10, 2011

It's used on suite and therefore it is reasonable to test against categories rather than one category.
The Category annotation already uses the plural. Backward compatibility is guaranteed.

If we accept this, it would be just easy to proceed with code changes in Catefories which would then expect a set of categories in fExcluded here instead of a sibgle value, and in an implementation of feature 307 as well. So I have already implemented symetric changes for both the fIncluded and fExcluded variables in Categories which is suited to both features in the same manner.

A static method
public static createCategoryFilter(Set<Class> includes, Set> excludes):CategoryFilter

should be added as an advantage to maven-surefire-plugin.

dsaff commented Oct 10, 2011

This makes sense to me. Let's be sure to be very clear in the specifications and tests about corner cases as they arise.

@Tibor17 Tibor17 added a commit to Tibor17/junit that referenced this issue Oct 12, 2011
@Tibor17 Tibor17 IncludeCategory and ExcludeCategory should have plural... (#336)
This enables you to specify even more than one category on a suite.
IMHO the Javadoc on Categories is not in conflict with this feature.
@Tibor17 Tibor17 added a commit to Tibor17/junit that referenced this issue Oct 28, 2011
@Tibor17 Tibor17 This is the implementation for a feature of Configurable Categories

You can make a narrow list of tests in your build process according to build specifics.
See the test CategoriesConfiguredBySystemPropertiesTest.
There the suite accepts almost all tests of platforms, and the system properties suppress some of them.

Here we use a Set of categories which was necessary in this feature. Not using single values in variables fIncluded either fExcluded in Categories class. See their comments in code.

This way we have built also a prerequisite for #336. See 'TODO' and 'FIX for issue #336' in class Categories.
dsaff commented Sep 20, 2013

I think we've finished this one off.

@dsaff dsaff closed this Sep 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment