Skip to content

Instantly share code, notes, and snippets.

@tonit
Created March 28, 2011 12:22
Show Gist options
  • Select an option

  • Save tonit/890375 to your computer and use it in GitHub Desktop.

Select an option

Save tonit/890375 to your computer and use it in GitHub Desktop.
See: you don't write starting or stopping a particular container. Its delegated to the ReactorStrategy
public void reactorRun( StagedExamReactorFactory strategy ) throws Exception
{
TestContainerFactory factory = getFactory();
Option[] options = new Option[]{ junitBundles(), easyMockBundles() };
ExxamReactor reactor = new DefaultExamReactor( factory );
TestProbeProvider probe = makeProbe();
reactor.addProbe( probe );
reactor.addConfiguration( options );
StagedExamReactor stagedReactor = reactor.stage( strategy );
try
{
for( TestAddress call : stagedReactor.getTargets() )
{
stagedReactor.invoke( call );
}
} finally
{
stagedReactor.tearDown();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment