private static void initStepListener() { Configuration configuration = Injectors.getInjector().getInstance(Configuration.class); File outputDirectory = configuration.getOutputDirectory(); StepListener listener = new BaseStepListener(outputDirectory, getPages()); stepListenerThreadLocal.set(listener); StepEventBus.getEventBus().registerListener(getStepListener()); }
/** A test outcome should relate to a particular test class or user story class. */ protected TestOutcome(final String methodName, final Class<?> testCase, final Story userStory) { startTime = System.currentTimeMillis(); this.methodName = methodName; this.testCase = testCase; this.additionalIssues = new HashSet<String>(); this.userStory = userStory; this.issueTracking = Injectors.getInjector().getInstance(IssueTracking.class); }
public TestOutcome(final String methodName, final Class<?> testCase) { startTime = System.currentTimeMillis(); this.methodName = methodName; this.testCase = testCase; this.additionalIssues = new HashSet<String>(); this.issueTracking = Injectors.getInjector().getInstance(IssueTracking.class); if (testCase != null) { initializeStoryFrom(testCase); } }
public WebElementFacadeImpl( final WebDriver driver, final ElementLocator locator, final WebElement webElement, final long implicitTimeoutInMilliseconds, final long waitForTimeoutInMilliseconds) { this.webElement = webElement; this.driver = driver; this.locator = locator; this.webdriverClock = new org.openqa.selenium.support.ui.SystemClock(); this.sleeper = Sleeper.SYSTEM_SLEEPER; this.javascriptExecutorFacade = new JavascriptExecutorFacade(driver); this.environmentVariables = Injectors.getInjector().getProvider(EnvironmentVariables.class).get(); this.implicitTimeoutInMilliseconds = implicitTimeoutInMilliseconds; this.waitForTimeoutInMilliseconds = (waitForTimeoutInMilliseconds >= 0) ? waitForTimeoutInMilliseconds : defaultWaitForTimeout(); }
public EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime) { this( consequenceThatMightTakeSomeTime, Injectors.getInjector().getInstance(Configuration.class).getElementTimeout() * 1000); }
public static TestOutcomes withNoResults() { return new TestOutcomes( Collections.EMPTY_LIST, Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount()); }
public static TestOutcomes of(List<? extends TestOutcome> outcomes) { return new TestOutcomes( outcomes, Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount()); }
public BuildInfoProvider(EnvironmentVariables environmentVariables) { this.environmentVariables = environmentVariables; this.driverCapabilityRecord = Injectors.getInjector().getInstance(DriverCapabilityRecord.class); }
public PageUrls(final Object pageObject) { this(pageObject, Injectors.getInjector().getInstance(Configuration.class)); }
public QuietThucydidesLoggingRule() { environmentVariables = Injectors.getInjector().getInstance(EnvironmentVariables.class); originalValue = environmentVariables.getProperty("thucydides.logging"); environmentVariables.setProperty("thucydides.logging", "QUIET"); }
private static void setupWebdriverManager() { setupWebdriverManager(Injectors.getInjector().getInstance(WebdriverManager.class)); }
private static DependencyInjectorService getDependencyInjectorService() { return Injectors.getInjector().getInstance(DependencyInjectorService.class); }
private static void setupWebDriverFactory() { factoryThreadLocal.set(Injectors.getInjector().getInstance(WebDriverFactory.class)); }
/** Create a new acceptance test run instance. */ public StoryTestResults(final Story story) { this( story, Injectors.getInjector().getInstance(Configuration.class), Injectors.getInjector().getInstance(IssueTracking.class)); }
private static HibernateTestStatisticsProvider defaultTestStatisticsProvider() { return Injectors.getInjector().getInstance(HibernateTestStatisticsProvider.class); }
protected AbstractRequirementsTagProvider(EnvironmentVariables environmentVariables) { this.environmentVariables = environmentVariables; this.requirementsConfiguration = new RequirementsConfiguration(environmentVariables); this.requirementsService = Injectors.getInjector().getInstance(RequirementsService.class); this.rootDirectory = getDefaultRootDirectory(); }
public AnnotationBasedTagProvider() { this(Injectors.getInjector().getInstance(EnvironmentVariables.class)); }