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

Enables class-array as parameter to @IncludeCategory and @ExludeCategory #565

Closed
wants to merge 6 commits into from
Closed

Enables class-array as parameter to @IncludeCategory and @ExludeCategory #565

wants to merge 6 commits into from

Conversation

gaffa
Copy link
Contributor

@gaffa gaffa commented Dec 4, 2012

As discussed here: https://github.com/KentBeck/junit/pull/142 and here: https://github.com/KentBeck/junit/pull/503 people are in urgent! need of specifying more than one Class in @ExcludeCategory and @IncludeCategory. It was discussed that there has to be a more sophisticated implementation (ALL/ANY) but I do not really think so. Even if: I would suggest accepting the simple solution as this means a fast benefit for everyone. In the end Selection is a compatible addition and not a different approach.

return new CategoryFilter(new Class<?>[]{categoryType}, null);
}

public static CategoryFilter include(Class<?>[] categoryType) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this Class<?>...

@dsaff
Copy link
Member

dsaff commented Dec 5, 2012

Thanks, @gaffa. This is a great opening. There's a few formatting fixes needed, but I'm more concerned that we might need to adjust the API to maintain compatibility.

@gaffa
Copy link
Contributor Author

gaffa commented Dec 5, 2012

Thank you for detailled feedback. I will adjust the implementation. Also I am pretty sure this is 100% compatible. Do I miss something?

@gaffa
Copy link
Contributor Author

gaffa commented Dec 5, 2012

Done. What do you think?

@Tibor17 Tibor17 mentioned this pull request Dec 6, 2012
private Class<?>[] fExcludedCategories = new Class<?>[]{};

public CategoryFilter(Class<?> includedCategory, Class<?> excludedCategory) {
if (includedCategory != null){
Copy link
Member

Choose a reason for hiding this comment

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

Style fix: Spaces before braces everywhere, please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like everywhere? I cannot see any on existing method-calls or constructors. I have already put them at for ( and if (. I will happily include more but I am pretty confused where it misses them.

@gaffa
Copy link
Contributor Author

gaffa commented Dec 7, 2012

@dsaff please take a look at @Tibor17 s pull-request (https://github.com/KentBeck/junit/pull/503) before accepting this one. I think he worked stuff out and it might be ready for merge. If you also think so we can close this one as far as I am concerned as he covers it.

@dsaff
Copy link
Member

dsaff commented Dec 7, 2012

Thanks for working with @Tibor17. I'll leave both open until one can be closed, but it looks like we're leaning toward #503, which is fine with me.

@gaffa
Copy link
Contributor Author

gaffa commented Dec 10, 2012

Happy to close it. Thanks for merging 503 in!

@gaffa gaffa closed this Dec 10, 2012
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.

2 participants