/** * Override to allow test methods with arguments */ @Override protected void validatePublicVoidNoArgMethods(Class<? extends Annotation> annotation, boolean isStatic, List<Throwable> errors) { List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(annotation); for (FrameworkMethod eachTestMethod : methods) { eachTestMethod.validatePublicVoid(isStatic, errors); } }
/** * Override to allow test methods with arguments */ @Override protected void validatePublicVoidNoArgMethods(Class<? extends Annotation> annotation, boolean isStatic, List<Throwable> errors) { List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(annotation); for (FrameworkMethod eachTestMethod : methods) { eachTestMethod.validatePublicVoid(isStatic, errors); } }
/** * Override to allow test methods with arguments */ @Override protected void validatePublicVoidNoArgMethods(Class<? extends Annotation> annotation, boolean isStatic, List<Throwable> errors) { List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(annotation); for (FrameworkMethod eachTestMethod : methods) { eachTestMethod.validatePublicVoid(isStatic, errors); } }
@Override public void evaluate() throws Throwable { deployableTest.get().beforeClass( Arquillian.this.getTestClass().getJavaClass(), new StatementLifecycleExecutor(onlyBefores)); originalStatement.evaluate(); } };
@Override public void evaluate() throws Throwable { adaptor.beforeClass( Arquillian.this.getTestClass().getJavaClass(), new StatementLifecycleExecutor(onlyBefores)); originalStatement.evaluate(); } };
@Override public void evaluate() throws Throwable { adaptor.beforeClass( Arquillian.this.getTestClass().getJavaClass(), new StatementLifecycleExecutor(onlyBefores)); originalStatement.evaluate(); } };
@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); } }
new BeforeRules(test, getTestClass(), stmtWithRules, method.getMethod(), new LifecycleMethodExecutor() { @Override
new BeforeRules(test, getTestClass(), stmtWithRules, method.getMethod(), new LifecycleMethodExecutor() { @Override
new RulesEnrichment(test, getTestClass(), method.getMethod(), LifecycleMethodExecutor.NO_OP));
new RulesEnrichment(test, getTestClass(), method.getMethod(), LifecycleMethodExecutor.NO_OP));