Examples of StoryDuration


Examples of org.jbehave.core.model.StoryDuration

        monitor.storiesSkipped(storyPaths);
        monitor.storyFailed(storyPath, cause);
        Story story = mock(Story.class);
        long durationInSecs = 1L;
        long timeoutInSecs = 2L;
        StoryDuration storyDuration = new StoryDuration(timeoutInSecs);
        monitor.storyTimeout(story, storyDuration);
        String value = "value";
        monitor.systemPropertySet(name, value);
        int threads = 2;
        monitor.usingThreads(threads);
View Full Code Here

Examples of org.jbehave.core.model.StoryDuration

        reporter.successful("When I write two parameters "
                + StepCreator.PARAMETER_VALUE_START+",,,"+StepCreator.PARAMETER_VALUE_END
                + " and "
                + StepCreator.PARAMETER_VALUE_START+"&&&"+StepCreator.PARAMETER_VALUE_END);
        reporter.restarted("Then I should... - try again", new RestartingScenarioFailure("hi"));
        reporter.storyCancelled(story, new StoryDuration(1).setDurationInSecs(2));
        if (withFailure) {
            reporter.failed("Then I should have a balance of $30", new Exception("Expected <30> got <25>"));
        } else {
            reporter.pending("Then I should have a balance of $30");
        }
View Full Code Here

Examples of org.jbehave.core.model.StoryDuration

        State state = mock(State.class);
   
        //When
        long durationInSecs = 2;
        long timeoutInSecs = 1;
        StoryDuration storyDuration = new StoryDuration(timeoutInSecs);
        try {
            StoryRunner runner = new StoryRunner();
            runner.cancelStory(story, storyDuration);
            runner.run(configuration, stepsFactory, story, metaFilter, state);
            fail("A exception should be thrown");
View Full Code Here

Examples of org.jbehave.core.model.StoryDuration

                  started = true;
                    Story story = runningStory.getStory();
          Future<ThrowableStory> future = runningStory.getFuture();
          if (!future.isDone()) {
            allDone = false;
            StoryDuration duration = runningStory.getDuration();
            runningStory.updateDuration();
            if (duration.timedOut()) {
              embedderMonitor.storyTimeout(story, duration);
              storyRunner.cancelStory(story, duration);
              future.cancel(true);
              if (embedderControls.failOnStoryTimeout()) {
                throw new StoryExecutionFailed(story.getPath(),
View Full Code Here

Examples of org.jbehave.core.model.StoryDuration

      return duration.getDurationInSecs() * 1000;
    }

    public StoryDuration getDuration() {
      if (duration == null) {
        duration = new StoryDuration(enqueuedStory.getStartedAtMillis(), enqueuedStory.getTimeoutInSecs());
      }
      return duration;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.