@Override public void run(final RunNotifier notifier) { if (State.hasAnyArquillianRule(this.getTestClass())) { throw new RuntimeException(String.format("TestClass: %s contains Arquillian runner and Arquillian Rule." + " Arquillian doesn't support @RunWith(Arquillian.class) and ArquillianTestClass or " + "ArquillianTest to use at the same time. You have to decide whether you want use runner:" + " http://arquillian.org/arquillian-core/#how-it-works or rules : http://arquillian.org/arquillian-core/#_how_to_use_it", this.getTestClass().getName())); } if (State.isNotRunningInEclipse()) { State.runnerStarted(); } AdaptorManagerWithNotifier adaptorManager = new AdaptorManagerWithNotifier(notifier) { protected void setAdaptor(TestRunnerAdaptor testRunnerAdaptor) { adaptor = testRunnerAdaptor; } protected TestRunnerAdaptor getAdaptor() { return adaptor; } protected Description getFailureDescription() { return getDescription(); } }; adaptorManager.initializeAdaptor(); adaptorManager.prepareDestroyAdaptorProcess(); // initialization ok, run children if (State.hasTestAdaptor()) { super.run(notifier); } }
@Override public void run(final RunNotifier notifier) { if (State.hasAnyArquillianRule(this.getTestClass())) { throw new RuntimeException(String.format("TestClass: %s contains Arquillian runner and Arquillian Rule." + " Arquillian doesn't support @RunWith(Arquillian.class) and ArquillianTestClass or " + "ArquillianTest to use at the same time. You have to decide whether you want use runner:" + " http://arquillian.org/arquillian-core/#how-it-works or rules : http://arquillian.org/arquillian-core/#_how_to_use_it", this.getTestClass().getName())); } if (State.isNotRunningInEclipse()) { State.runnerStarted(); } AdaptorManagerWithNotifier adaptorManager = new AdaptorManagerWithNotifier(notifier) { protected void setAdaptor(TestRunnerAdaptor testRunnerAdaptor) { adaptor = testRunnerAdaptor; } protected TestRunnerAdaptor getAdaptor() { return adaptor; } protected Description getFailureDescription() { return getDescription(); } }; adaptorManager.initializeAdaptor(); adaptorManager.prepareDestroyAdaptorProcess(); // initialization ok, run children if (State.hasTestAdaptor()) { super.run(notifier); } }