Beispiel #1
0
 public void The_report_should_have_output_for_then()
 {
     ScenarioReport.Should().Contain(Settings.GetStep(StepType.Then));
 }
Beispiel #2
0
 public void It_should_generate_the_correct_report()
 {
     ScenarioReport.Should().Be(
         "Feature: TestSupport\r\n\r\nScenario: Pascal test\r\n  Given an assumption\r\n  When performing the deed\r\n  Then it should do the right thing");
 }
Beispiel #3
0
 public void It_should_use_the_class_name()
 {
     ScenarioReport.Should().StartWith(string.Format("{0}Fixture uses implicit scenario description",
                                                     GherkinTestFrameworkSettingsFacade.GetInstance().GetToken(TokenType.Scenario)));
 }
 public void It_should_generate_the_correct_report()
 {
     ScenarioReport.Should().Be(
         "Feature: TestSupport\r\n\r\nScenario: When generating report for default step names and custom steps scenario\r\n  Given one thing\r\n    And another thing\r\n    And yet another thing\r\n  When i open my eyes\r\n  Then i see something\r\n    But i dont see something else");
 }
 public void It_should_not_output_anything()
 {
     ScenarioReport.Should().BeEmpty();
 }
Beispiel #6
0
 public void And_then()
 {
     ScenarioReport.Should().Contain(Settings.GetStep(StepType.Then));
 }
Beispiel #7
0
 public void But_not_for_when()
 {
     ScenarioReport.Should().NotContain(Settings.GetStep(StepType.When));
 }
 /// <summary>
 ///     Decorates the specified <see cref="ScenarioReport" />.
 /// </summary>
 /// <param name="report">The <see cref="ScenarioReport" />.</param>
 /// <returns>The decorated <see cref="ScenarioReport" />.</returns>
 public ScenarioReportDecorator Decorate(ScenarioReport report)
 {
     return new ScenarioReportDecorator(report);
 }
Beispiel #9
0
 public void It_should_generate_the_correct_report()
 {
     ScenarioReport.Should().Be(
         "Feature: TestSupport\r\n\r\nScenario Outline: Eating cucumbers\r\n  Given there are 12 cucumbers\r\n  When i eat 5 cucumbers\r\n  Then i should have 7 cucumbers");
 }
 public void It_should_have_tag_attributes()
 {
     ScenarioReport.Should().Contain("@Foo").And.Contain("@Bar");
 }
    public void Update()
    {
        // quit if we're not playing or completed
        if (state != State.Playing)
            return;

		// turn up speed after things get settled
		if ( elapsedTime > 2.0f && elapsedTime < 3.0f )
			Time.timeScale = InteractPlaybackFileMgr.GetInstance().timeScale;

		// elapsed time
		elapsedTime += Time.deltaTime;

		// check playback
		if (currentIdx != -1 && List.Items.Count > 0)
        {
            // get item
            PlaybackItem item = List.Items[currentIdx];

 			// if the elapsed time is greater than item time then just execute it!
			if ( elapsedTime > item.RealTime )
			{
				item.Execute();

				if ( item.Executed == true )
				{
					// reset elapsedTime back to what it should be
					elapsedTime = item.RealTime;
					// increment
	                if (++currentIdx >= List.Items.Count)
	                {
	                   currentIdx = -1;
	                }
				}
			}
        }

		// check break condition, something hung up
		if ( currentIdx != -1 && currentIdx < List.Items.Count-1 )
		{
			PlaybackItem item = List.Items[currentIdx+1];
			if ( item != null )
			{
				if ( item.RealTime-InteractPlaybackMgr.GetInstance().elapsedTime <= 0.0f )
				{
					PlaybackItem current = List.Items[currentIdx];
					UnityEngine.Debug.LogError("InteractPlaybackMgr.Update() : Playback lockup on command <" + current.Debug () + "> at time=" + current.RealTime);
					UnityEngine.Debug.LogError("InteractPlaybackMgr.Update() : prev <" + List.Items[currentIdx-1].Debug () );
					if ( currentIdx+1 < List.Items.Count )
						UnityEngine.Debug.LogError("InteractPlaybackMgr.Update() : next <" + List.Items[currentIdx+1].Debug () );
					if (RestartOnDoneOrError){
						UnityEngine.Debug.LogError("Restarting!");
						RestartWithList(List);
					}
				}
			}

		}

        // check if we're done and then wait 2 seconds and display assessment dialog
        if (Done() == true && elapsedTime > restartTime)
        {
#if DISPLAY_ASSESSMENT_DIALOG
            // run the report here
            // for testing, evaluate on every interact msg...
            ScenarioReport report = new ScenarioReport();
            report.SetInfo("Trauma", "Rob", "123981328123");
            report.SetScenario("Scenario 1");
            report.Evaluate();
            report.SaveDatabase();

            AssessmentMgrDialogMsg amd = new AssessmentMgrDialogMsg();
            amd.command = DialogMsg.Cmd.open;
            amd.Report = report.Report;
            AssessmentMgrDialog.GetInstance().PutMessage(amd);
#endif
			if ( RestartOnDoneOrError == true )
			{
				UnityEngine.Debug.LogError("InteractPlaybackMgr.Update() : Sucessful...Restarting!");
				RestartWithList(List);
			}
        }
    }
Beispiel #12
0
 public void It_should_generate_the_correct_report()
 {
     ScenarioReport.Should().Be(
         "Feature: TestSupport\r\n\r\nScenario: When generating report for underscore step names scenario\r\n  Given an assumption\r\n  When performing the deed\r\n  Then it should do the right thing");
 }
 /// <summary>
 ///     Decorates the specified <see cref="ScenarioReport" />.
 /// </summary>
 /// <param name="report">The <see cref="ScenarioReport" />.</param>
 /// <returns>The decorated <see cref="ScenarioReport" />.</returns>
 public ScenarioReportDecorator Decorate(ScenarioReport report)
 {
     return(new ScenarioReportDecorator(report));
 }
Beispiel #14
0
 public void It_should_generate_a_brief_report()
 {
     ScenarioReport.Should().Be(string.Format(
                                    "{0} generating report for default step names scenario", Settings.GetStep(StepType.When)));
 }