Package org.guvnor.test
Class WeldJUnitRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
- org.junit.runners.BlockJUnit4ClassRunner
-
- org.guvnor.test.WeldJUnitRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
public class WeldJUnitRunner extends org.junit.runners.BlockJUnit4ClassRunnerSimple JUnit test runner which automatically takes care of starting Weld container before the test runs and stopping the Weld after the test finishes.The test class can also use all CDI constructs (like @Inject). For example the test can inject BeanManager: ...
-
-
Constructor Summary
Constructors Constructor Description WeldJUnitRunner(Class<?> testClass)Creates a WeldJUnitRunner to runtestClass
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectcreateTest()voidrunChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)-
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
-
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
-
-
-
-
Constructor Detail
-
WeldJUnitRunner
public WeldJUnitRunner(Class<?> testClass) throws org.junit.runners.model.InitializationError
Creates a WeldJUnitRunner to runtestClass- Parameters:
testClass-- Throws:
org.junit.runners.model.InitializationError- if the test class is malformed.
-
-
Method Detail
-
createTest
protected Object createTest() throws Exception
- Overrides:
createTestin classorg.junit.runners.BlockJUnit4ClassRunner- Throws:
Exception
-
runChild
public void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)- Overrides:
runChildin classorg.junit.runners.BlockJUnit4ClassRunner
-
-