org.jboss.osgi.husky.runtime.junit
Class JUnitRunner
java.lang.Object
org.jboss.osgi.husky.runtime.junit.JUnitRunner
- All Implemented Interfaces:
- Runner
- Direct Known Subclasses:
- OSGiJUnitRunner
public class JUnitRunner
- extends java.lang.Object
- implements Runner
An implementation of a Runner that uses the
JUnit4 Test Runner.
- Since:
- 16-May-2009
- Author:
- Thomas.Diesler@jboss.com
|
Method Summary |
void |
injectContext(java.lang.Class<?> testClass,
java.lang.Object target,
Context context)
Inject the Context in the test case instance |
protected void |
injectField(java.lang.reflect.Field field,
java.lang.Object target,
Context value)
|
protected void |
injectMethod(java.lang.reflect.Method method,
java.lang.Object target,
Context value)
|
Response |
runTests(Context context,
java.lang.Class<?> testClass)
Run the tests in the given test class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JUnitRunner
public JUnitRunner()
runTests
public Response runTests(Context context,
java.lang.Class<?> testClass)
- Run the tests in the given test class.
- Specified by:
runTests in interface Runner
injectContext
public void injectContext(java.lang.Class<?> testClass,
java.lang.Object target,
Context context)
throws java.lang.Exception
- Description copied from interface:
Runner
- Inject the
Context in the test case instance
- Specified by:
injectContext in interface Runner
- Throws:
java.lang.Exception
injectMethod
protected void injectMethod(java.lang.reflect.Method method,
java.lang.Object target,
Context value)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
injectField
protected void injectField(java.lang.reflect.Field field,
java.lang.Object target,
Context value)
throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
Copyright © 2009. All Rights Reserved.