public interface

TestContainer

org.ops4j.pax.exam.TestContainer

Class Overview

Management of an OSGi framework that can be used as a integration test container. Each container is also a test target. When constucting TestContainers, it is good practice to not put the parsing part (from Option[]) into the implementation. Instead, make the native container construction really simple and tied to the underlying container.

Summary

Public Methods
abstract void call(TestAddress address)
abstract long install(String location, InputStream stream)
abstract long install(InputStream stream)
abstract TestContainer start()
Starts the test container.
abstract TestContainer stop()
Stops the regression container.

Public Methods

public abstract void call (TestAddress address)

Parameters
address the target to be called.
Throws
TestContainerException exception

public abstract long install (String location, InputStream stream)

Parameters
location update location of the installed stream. (used on bundle.update())
stream stream the content
Returns
  • Bundle ID

public abstract long install (InputStream stream)

Parameters
stream stream the content
Returns
  • Bundle ID

public abstract TestContainer start ()

Starts the test container.

Returns
  • this for fluent api
Throws
TimeoutException - if timeout occured and the test container cannot be started

public abstract TestContainer stop ()

Stops the regression container. Implementations should take care of calling cleanup() internally, too.

Returns
  • this for fluent api
Throws
TimeoutException - if timeout occured and the regression container cannot be stopped