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

Javadoc for RuleChain contains errors #1295

Closed
rillig-nm opened this issue May 13, 2016 · 4 comments
Closed

Javadoc for RuleChain contains errors #1295

rillig-nm opened this issue May 13, 2016 · 4 comments

Comments

@rillig-nm
Copy link

  • The class modifier static is not necessary.
  • The method calls are missing closing parentheses.

In addition, the documentation should make clear that the RuleChain cannot be used to define the order of existing rules, e.g. the following does not work as expected:

@Rule
public LoggingRule middle = new LoggingRule("middle rule");
@Rule
public RuleChain chain = RuleChain
    .outerRule(new LoggingRule("outer rule"))
    .around(middle)
    .around(new LoggingRule("inner rule"));

In this code, middle is executed twice.

@marcphilipp
Copy link
Member

You're right -- thanks for reporting this issue!

Do you have time to submit a fix?

@rillig-nm
Copy link
Author

No, I don’t. Setting up the necessary IDE that exactly follows your coding conventions doesn’t seem time-efficient to me.

@marcphilipp
Copy link
Member

If you use Eclipse you just have to clone the repo and open the project in Eclipse.

@Harrisnick
Copy link
Contributor

I have come across this issue and thought it would be a great way to start contributing to JUnit. I'd like to modify the Javadoc as suggested by rillig-nm and also add something to clarify how RuleChaining works with existing rules.

I will submit a fix now.

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

No branches or pull requests

3 participants