Package io.github.cdiunit.junit4
Class CdiJUnit
java.lang.Object
io.github.cdiunit.junit4.CdiJUnit
CDI Unit supports JUnit via:
- * JUnit Rules - see
CdiJUnitRule
* - * JUnit runners - see
CdiRunner
*
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.junit.rules.TestRule
Creates rule instance that manages CDI Unit for classes usingIsolationLevel.PER_CLASS
.static org.junit.rules.MethodRule
Creates method rule instance that manages CDI Unit.
-
Constructor Details
-
CdiJUnit
- Throws:
IllegalAccessException
-
-
Method Details
-
methodRule
public static org.junit.rules.MethodRule methodRule()Creates method rule instance that manages CDI Unit.- Returns:
- the rule instance
-
classRule
public static org.junit.rules.TestRule classRule()Creates rule instance that manages CDI Unit for classes usingIsolationLevel.PER_CLASS
. An instance of {link CdiJUnit#methodRule} is also required.- Returns:
- the rule instance
-