コード例 #1
0
ファイル: Serenity.java プロジェクト: ovenal/serenity-core
 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());
 }
コード例 #2
0
 /** 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);
 }
コード例 #3
0
 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);
   }
 }
コード例 #4
0
 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();
 }
コード例 #5
0
 public EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime) {
   this(
       consequenceThatMightTakeSomeTime,
       Injectors.getInjector().getInstance(Configuration.class).getElementTimeout() * 1000);
 }
コード例 #6
0
ファイル: TestOutcomes.java プロジェクト: kpiwko/thucydides
 public static TestOutcomes withNoResults() {
   return new TestOutcomes(
       Collections.EMPTY_LIST,
       Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount());
 }
コード例 #7
0
ファイル: TestOutcomes.java プロジェクト: kpiwko/thucydides
 public static TestOutcomes of(List<? extends TestOutcome> outcomes) {
   return new TestOutcomes(
       outcomes,
       Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount());
 }
コード例 #8
0
 public BuildInfoProvider(EnvironmentVariables environmentVariables) {
   this.environmentVariables = environmentVariables;
   this.driverCapabilityRecord = Injectors.getInjector().getInstance(DriverCapabilityRecord.class);
 }
コード例 #9
0
ファイル: PageUrls.java プロジェクト: GeeChao/serenity-core
 public PageUrls(final Object pageObject) {
   this(pageObject, Injectors.getInjector().getInstance(Configuration.class));
 }
コード例 #10
0
 public QuietThucydidesLoggingRule() {
   environmentVariables = Injectors.getInjector().getInstance(EnvironmentVariables.class);
   originalValue = environmentVariables.getProperty("thucydides.logging");
   environmentVariables.setProperty("thucydides.logging", "QUIET");
 }
コード例 #11
0
 private static void setupWebdriverManager() {
   setupWebdriverManager(Injectors.getInjector().getInstance(WebdriverManager.class));
 }
コード例 #12
0
ファイル: Serenity.java プロジェクト: ovenal/serenity-core
 private static DependencyInjectorService getDependencyInjectorService() {
   return Injectors.getInjector().getInstance(DependencyInjectorService.class);
 }
コード例 #13
0
ファイル: Serenity.java プロジェクト: ovenal/serenity-core
 private static void setupWebDriverFactory() {
   factoryThreadLocal.set(Injectors.getInjector().getInstance(WebDriverFactory.class));
 }
コード例 #14
0
 /** Create a new acceptance test run instance. */
 public StoryTestResults(final Story story) {
   this(
       story,
       Injectors.getInjector().getInstance(Configuration.class),
       Injectors.getInjector().getInstance(IssueTracking.class));
 }
コード例 #15
0
ファイル: TestOutcomes.java プロジェクト: kpiwko/thucydides
 private static HibernateTestStatisticsProvider defaultTestStatisticsProvider() {
   return Injectors.getInjector().getInstance(HibernateTestStatisticsProvider.class);
 }
コード例 #16
0
 protected AbstractRequirementsTagProvider(EnvironmentVariables environmentVariables) {
   this.environmentVariables = environmentVariables;
   this.requirementsConfiguration = new RequirementsConfiguration(environmentVariables);
   this.requirementsService = Injectors.getInjector().getInstance(RequirementsService.class);
   this.rootDirectory = getDefaultRootDirectory();
 }
コード例 #17
0
 public AnnotationBasedTagProvider() {
   this(Injectors.getInjector().getInstance(EnvironmentVariables.class));
 }