public Object newDataDrivenSteps(final Class<?> scenarioStepsClass, final List<?> instantiatedSteps) { DataDrivenStepInterceptor stepInterceptor = new DataDrivenStepInterceptor(instantiatedSteps); return factory.instantiateNewStepLibraryFor(scenarioStepsClass, stepInterceptor, true); } }
public Object newDataDrivenSteps(final Class<?> scenarioStepsClass, final List<?> instantiatedSteps) { DataDrivenStepInterceptor stepInterceptor = new DataDrivenStepInterceptor(instantiatedSteps); return factory.instantiateNewStepLibraryFor(scenarioStepsClass, stepInterceptor); } }
public Object newDataDrivenSteps(final Class<?> scenarioStepsClass, final List<?> instantiatedSteps) { DataDrivenStepInterceptor stepInterceptor = new DataDrivenStepInterceptor(instantiatedSteps); return factory.instantiateNewStepLibraryFor(scenarioStepsClass, stepInterceptor); } }
/** * Create a new instance of a class containing test steps. * This method will instrument the class appropriately and inject any nested step libraries or * other dependencies. */ public <T> T instantiateNewStepLibraryFor(Class<T> scenarioStepsClass) { StepInterceptor stepInterceptor = new StepInterceptor(scenarioStepsClass); return instantiateNewStepLibraryFor(scenarioStepsClass, stepInterceptor); }
public <T> T getNewCachedStepLibraryFor(final Class<T> scenarioStepsClass) { try { return instantiateNewStepLibraryFor(scenarioStepsClass, WITH_CACHING); } catch (RecursiveOrCyclicStepLibraryReferenceException recursiveCallException) { throw recursiveCallException; } catch (RuntimeException stepCreationFailed) { throw new StepInitialisationException("Failed to create step library for " + scenarioStepsClass.getSimpleName() + ":" + stepCreationFailed.getMessage(), stepCreationFailed); } }
/** * Create a new instance of a class containing test steps. * This method will instrument the class appropriately and inject any nested step libraries or * other dependencies. */ public <T> T instantiateNewStepLibraryFor(Class<T> scenarioStepsClass, boolean cacheNewInstance) { StepInterceptor stepInterceptor = new StepInterceptor(scenarioStepsClass); return instantiateNewStepLibraryFor(scenarioStepsClass, stepInterceptor, cacheNewInstance); }
public <T> T getNewStepLibraryFor(final Class<T> scenarioStepsClass) { try { return instantiateNewStepLibraryFor(scenarioStepsClass, WITH_NO_CACHING); } catch (RecursiveOrCyclicStepLibraryReferenceException recurciveCallException) { throw recurciveCallException; } catch (RuntimeException stepCreationFailed) { throw new StepInitialisationException("Failed to create step library for " + scenarioStepsClass.getSimpleName() + ":" + stepCreationFailed.getMessage(), stepCreationFailed); } }
public <T> T getNewStepLibraryFor(final Class<T> scenarioStepsClass) { if (isStepLibraryInstantiatedFor(scenarioStepsClass)) { return getManagedStepLibraryFor(scenarioStepsClass); } else { return instantiateNewStepLibraryFor(scenarioStepsClass); } }
/** * Create a new instance of a class containing test steps. * This method will instrument the class appropriately and inject any nested step libraries or * other dependencies. */ public <T> T instantiateNewStepLibraryFor(Class<T> scenarioStepsClass) { StepInterceptor stepInterceptor = new StepInterceptor(scenarioStepsClass); stepInterceptor.setThowsExceptionImmediately(throwExceptionImmediately); return instantiateNewStepLibraryFor(scenarioStepsClass, stepInterceptor); }
/** * Returns a new ScenarioSteps instance, of the specified type. * This is actually a proxy that allows reporting and screenshots to * be performed at each step. */ public <T> T getStepLibraryFor(final Class<T> scenarioStepsClass) { if (isStepLibraryInstantiatedFor(scenarioStepsClass)) { return getManagedStepLibraryFor(scenarioStepsClass); } else { return instantiateNewStepLibraryFor(scenarioStepsClass); } }
public <T> T getNewStepLibraryFor(final Class<T> scenarioStepsClass) { if (isStepLibraryInstantiatedFor(scenarioStepsClass)) { return getManagedStepLibraryFor(scenarioStepsClass); } else { return instantiateNewStepLibraryFor(scenarioStepsClass); } }
/** * Returns a new ScenarioSteps instance, of the specified type. * This is actually a proxy that allows reporting and screenshots to * be performed at each step. * @param scenarioStepsClass the scenario step class * @param <T> the scenario step class type * @return the instrumented step library */ public <T> T getStepLibraryFor(final Class<T> scenarioStepsClass) { if (isStepLibraryInstantiatedFor(scenarioStepsClass)) { return getManagedStepLibraryFor(scenarioStepsClass); } else { return instantiateNewStepLibraryFor(scenarioStepsClass); } }