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

Is there any way to use @Rule with NestedRunner ? #10

Open
tak2siva opened this issue Sep 23, 2016 · 3 comments
Open

Is there any way to use @Rule with NestedRunner ? #10

tak2siva opened this issue Sep 23, 2016 · 3 comments
Assignees

Comments

@tak2siva
Copy link

No description provided.

@xkr47
Copy link
Member

xkr47 commented Sep 23, 2016

Which runner do you mean? There are several :)

@tak2siva
Copy link
Author

tak2siva commented Sep 23, 2016

@xkr47 :) edited the question.
When I run my tests in Intellij with @RunWith(MockitoJUnitRunner.class) @Rule is working. But when I try with @RunWith(NestedRunner.class) its not honoring the junit rules I've added. What am I missing here ?

@tak2siva tak2siva changed the title Is there any way to use @Rule with this runner ? Is there any way to use @Rule with this NestedRunner ? Sep 23, 2016
@tak2siva tak2siva changed the title Is there any way to use @Rule with this NestedRunner ? Is there any way to use @Rule with NestedRunner ? Sep 23, 2016
@xkr47 xkr47 assigned Macroz and niom Sep 23, 2016
@Macroz
Copy link
Member

Macroz commented Sep 26, 2016

This Runner was built a long time ago, and without @Rule support. Maybe you can get away with the new JUnit5 functionality? http://junit.org/junit5/docs/current/user-guide/#writing-tests-nested

@Macroz Macroz removed their assignment Dec 17, 2020
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

No branches or pull requests

4 participants