org.eclipse.gemini.blueprint.test.internal
Interface OsgiJUnitTest

All Known Implementing Classes:
OsgiJUnitTestAdapter

public interface OsgiJUnitTest

JUnit contract for OSGi environments. It wraps some of TestCase methods as well as adds some to allow flexible access to the test instance by the TestRunnerService implementation.

Author:
Costin Leau

Method Summary
 junit.framework.TestCase getTestCase()
          Simple getter that returns the raw TestCase class.
 void injectBundleContext(org.osgi.framework.BundleContext bundleContext)
          Provides the OSGi bundle context to the test
 void osgiRunTest()
          Replacement for the 'traditional' runTest.
 void osgiSetUp()
          Replacement for the 'traditional' setUp.
 void osgiTearDown()
          Replacement for the 'traditional' tearDown.
 

Method Detail

osgiSetUp

void osgiSetUp()
               throws Exception
Replacement for the 'traditional' setUp. Called by TestRunnerService.

Throws:
Exception
See Also:
TestCase.setUp()

osgiTearDown

void osgiTearDown()
                  throws Exception
Replacement for the 'traditional' tearDown. Called by TestRunnerService.

Throws:
Exception
See Also:
TestCase.tearDown()

osgiRunTest

void osgiRunTest()
                 throws Throwable
Replacement for the 'traditional' runTest. Called by TestRunnerService.

Throws:
Throwable

injectBundleContext

void injectBundleContext(org.osgi.framework.BundleContext bundleContext)
Provides the OSGi bundle context to the test

Parameters:
bundleContext -

getTestCase

junit.framework.TestCase getTestCase()
Simple getter that returns the raw TestCase class. Used mainly when applying OsgiJUnit functionality through decoration rather then inheritance.

Returns:


Copyright © 2006-2012. All Rights Reserved.