de.akquinet.jbosscc.needle.junit
Class NeedleRule
java.lang.Object
de.akquinet.jbosscc.needle.NeedleTestcase
de.akquinet.jbosscc.needle.junit.NeedleRule
- All Implemented Interfaces:
- org.junit.rules.MethodRule
public class NeedleRule
- extends NeedleTestcase
- implements org.junit.rules.MethodRule
JUnit MethodRule for the initialization of the test. The Rule process
and initialize all Fields annotated with ObjectUnderTest.
Example:
public class UserDaoBeanTest {
@Rule
public NeedleRule needle = new NeedleRule();
@ObjectUnderTest
private UserDaoBean userDao;
@Test
public void test() {
...
userDao.someAction();
...
}
}
- See Also:
NeedleTestcase
|
Method Summary |
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
Object target)
Before evaluation of the base statement, the test instance
will initialized. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NeedleRule
public NeedleRule(InjectionProvider<?>... injectionProvider)
- See Also:
NeedleTestcase.NeedleTestcase(InjectionProvider...)
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
Object target)
- Before evaluation of the base statement, the test instance
will initialized.
- Specified by:
apply in interface org.junit.rules.MethodRule
Copyright © 2012 akquinet AG. All Rights Reserved.