public static IFeatureResult GetFeatureResultWithoutDescriptionNorLabelNorDetails() { return(Mocks.CreateFeatureResult("My feature", null, null, Mocks.CreateScenarioResult("name", null, _startDate.AddSeconds(1), TimeSpan.FromMilliseconds(25), null, Mocks.CreateStepResult(1, "step1", ResultStatus.Passed, _startDate.AddSeconds(2), TimeSpan.FromMilliseconds(20)), Mocks.CreateStepResult(2, "step2", ResultStatus.Ignored, _startDate.AddSeconds(3), TimeSpan.FromMilliseconds(5))))); }
public static IFeatureResult[] GetMultipleFeatureResults() { var feature1 = Mocks.CreateFeatureResult("My feature", null, null, Mocks.CreateScenarioResult("scenario1", null, _startDate.AddSeconds(1), TimeSpan.FromMilliseconds(20), new[] { "categoryA" }, Mocks.CreateStepResult(1, "step1", ResultStatus.Passed, _startDate.AddSeconds(2), TimeSpan.FromMilliseconds(20)))); var feature2 = Mocks.CreateFeatureResult("My feature2", null, null, Mocks.CreateScenarioResult("scenario1", null, _startDate.AddSeconds(4), TimeSpan.FromMilliseconds(20), new[] { "categoryB" }, Mocks.CreateStepResult(1, "step1", ResultStatus.Passed, _startDate.AddSeconds(5), TimeSpan.FromMilliseconds(20)))); return(new[] { feature1, feature2 }); }
public static IFeatureResult GetFeatureResultWithDescription() { return(Mocks.CreateFeatureResult("My feature", string.Format("My feature{0}long description", Environment.NewLine), "Label 1", Mocks.CreateScenarioResult("name", "Label 2", _startDate.AddSeconds(1), new TimeSpan(0, 0, 1, 2, 100), new[] { "categoryA" }, Mocks.CreateStepResult(1, ResultStatus.Passed) .WithTimes(_startDate.AddSeconds(2), new TimeSpan(0, 1, 1)) .WithStepNameDetails("call step1 \"arg1\"", "step1 \"{0}\"", "call", "arg1") .WithComments(@"multiline comment", "comment 2"), Mocks.CreateStepResult(2, "step2", ResultStatus.Ignored, _startDate.AddSeconds(3), new TimeSpan(0, 0, 0, 1, 100), "Not implemented yet")), Mocks.CreateScenarioResult("name2", null, _startDate.AddSeconds(4), new TimeSpan(0, 0, 0, 2, 157), new[] { "categoryB", "categoryC" }, Mocks.CreateStepResult(1, "step3", ResultStatus.Bypassed, _startDate.AddSeconds(5), new TimeSpan(0, 0, 0, 2, 107), "bypass reason"), Mocks.CreateStepResult(2, "step4", ResultStatus.Failed, _startDate.AddSeconds(6), new TimeSpan(0, 0, 0, 0, 50), string.Format(" Expected: True{0} But was: False", Environment.NewLine)), Mocks.CreateStepResult(3, "step5", ResultStatus.NotRun)))); }
public IScenarioResult Build() { return(Mocks.CreateScenarioResult("scenario", "label", DateTimeOffset.Now, TimeSpan.FromSeconds(2), Categories, Mocks.CreateStepResult(1, "step1", ResultStatus.Passed, TimeSpan.FromSeconds(1)), Mocks.CreateStepResult(2, "step2", Status, TimeSpan.FromSeconds(1)))); }