java - Multiple Rules in JUnit -
I have defined two rules defined in one of the test classes, but the strange thing is that one of them works at one time - One defined the last.
@Rule public expected exception exception = ExpectedException.none (); @ Rules Public floating folder folder = new temporary folder ();
How do I define two or more rules for my life and how to use them separately
I had a single problem, and I found that in that case you can use Rule China, like:
Public floating folders; Thousands of hope of hope; @Rules Public Test Rules Series = Rule Chain.outerRule (temp = new TemporaryFolder ()) .Round (Throwed = Expected Exception.none ());
You can see another example, and it can also help.
Comments
Post a Comment