org.jboss.osgi.husky.runtime
Interface Runner

All Known Implementing Classes:
JUnitRunner, OSGiJUnitRunner

public interface Runner

An abstraction of a test runner that executes the given test case in the isolated test environment.

Since:
16-May-2009
Author:
Thomas.Diesler@jboss.com

Method Summary
 void injectContext(Class<?> testClass, Object test, Context context)
          Inject the Context in the test case instance
 Response runTests(Context context, Class<?> testClass)
          Run the tests in the given test class.
 

Method Detail

runTests

Response runTests(Context context,
                  Class<?> testClass)
Run the tests in the given test class. Simmilar to the JUnitRunner a valid implementation would do something simmilar to
  1. Instanciate the test case
  2. Inject the context in the field marked by RuntimeContext
  3. Run the individual test methods
  4. Collect the test results and wrap them in the Response
Note, some test frameworks may choose to use an instance per test method.


injectContext

void injectContext(Class<?> testClass,
                   Object test,
                   Context context)
                   throws Exception
Inject the Context in the test case instance

Throws:
Exception


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.