Eclipse 3.7.2
I just implemented @Rulesome JUnit 4 tests, but when I run them in Eclipse, the methods are MethodRulenot called. It, like the Eclipse tester, does not recognize implementations @Ruleand does nothing special with fields that are annotated using @Rule.
@Rule
MethodRule
I even tried using the "Standard" MethodRule, for example org.junit.rules.TestName, but it does not work properly (test names do not populate in the instance). Even the sample test in JavaDoc TestNamedoes not work when run in Eclipse.
org.junit.rules.TestName
TestName
Is there any trick? Eclipse just doesn't support JUnit Rules ?
, - "" JAR , . JAR , , JUnit! , JAR - , our_runtime_library.jar, , ( ) JUnit, Spring, , . Unit Test Eclipse JUnit JAR ( - , ), (Eclipse), .
our_runtime_library.jar
; , , 50 .
, , Eclipse ( JUnit 4.8). , .
, JavaDoc : Note that MethodRule is now deprecated, you should be using TestRule instead.
Note that MethodRule is now deprecated, you should be using TestRule instead.