@Override public void run(RunNotifier notifier) { try { super.run(notifier); } catch (Exception e) { throw new TestContainerException("Problem interacting with reactor.", e); } finally { m_reactor.tearDown(); } }
private void fillChildren() { Set<TestAddress> targets = m_reactor.getTargets(); for (final TestAddress address : targets) { final FrameworkMethod frameworkMethod = m_map.get(address.root()); // now, someone later may refer to that artificial FrameworkMethod. We need to be able to tell // the address. FrameworkMethod method = new DecoratedFrameworkMethod(address, frameworkMethod); m__childs.put(method, address); } }
@Test public void testLesson2Unit1() throws Exception { TestContainerFactory factory = getTestContainerFactory(); ExamSystem system = createTestSystem(); ExxamReactor reactor = new DefaultExamReactor(system, factory); TestProbeProvider probe = makeProbe(system); reactor.addProbe(probe); reactor.addConfiguration(options(junitBundles(), easyMockBundles())); StagedExamReactorFactory strategy = new EagerSingleStagedReactorFactory(); StagedExamReactor stagedReactor = reactor.stage(strategy); try { for (TestAddress call : stagedReactor.getTargets()) { stagedReactor.invoke(call); } } finally { stagedReactor.tearDown(); } }