Skip to content

Commit d3fdac5

Browse files
committed
Merge pull request #140 from JakeGinnivan/TagSupport
Tag support
2 parents 3d5e358 + a050c19 commit d3fdac5

32 files changed

+443
-65
lines changed

TestStack.BDDfy.Tests/Configuration/BatchProcessorsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void ReturnsMarkdownReporterWhenItIsActivated()
6060
[Test]
6161
public void ReturnsHtmlMetroReporterWhenItIsActivated()
6262
{
63-
Configurator.BatchProcessors.HtmlMetroReport.Enable();
63+
Configurator.BatchProcessors.HtmlMetroReport.Enable();
6464

6565
var processors = Configurator.BatchProcessors.GetProcessors().ToList();
6666
Assert.IsTrue(processors.Any(MetroReportProcessorIsActive), "The metro Html report was not found in batch processors");

TestStack.BDDfy.Tests/Processors/TestRunnerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class TestRunnerTests
1515
public void InitialisesScenarioWithExampleBeforeRunning()
1616
{
1717
const int expectedValue = 1;
18-
int actualValue = 0;
18+
var actualValue = 0;
1919
var exampleTable = new ExampleTable("ExampleValue")
2020
{
2121
expectedValue
@@ -25,7 +25,7 @@ public void InitialisesScenarioWithExampleBeforeRunning()
2525
Action<object> action = o => actualValue = ExampleValue;
2626
var steps = new List<Step> { new Step(action, new StepTitle("A Step"), true, ExecutionOrder.Initialize, true) };
2727

28-
var scenarioWithExample = new Scenario("id", this, steps, "Scenario Text", exampleTable, new List<StepArgument>());
28+
var scenarioWithExample = new Scenario("id", this, steps, "Scenario Text", exampleTable, new List<StepArgument>(), new List<string>());
2929
var story = new Story(new StoryMetadata(typeof(TestRunnerTests), new StoryNarrativeAttribute()),
3030
new[] { scenarioWithExample });
3131

TestStack.BDDfy.Tests/Reporters/Html/ClassicReportBuilderTests.ShouldProduceExpectedHtml.approved.txt

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

TestStack.BDDfy.Tests/Reporters/Html/ClassicReportBuilderTests.ShouldProduceExpectedHtmlWithExamples.approved.txt

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

TestStack.BDDfy.Tests/Reporters/Html/MetroReportBuilderTests.ShouldProduceExpectedHtml.approved.txt

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

TestStack.BDDfy.Tests/Reporters/Html/MetroReportBuilderTests.ShouldProduceExpectedHtmlWithExamples.approved.txt

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

TestStack.BDDfy.Tests/Reporters/ReportTestData.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public IEnumerable<Story> CreateMixContainingEachTypeOfOutcomeWithOneScenarioPer
4949

5050
var stories = new List<Story>
5151
{
52-
new Story(storyMetadata1, new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario [for Happiness]")),
53-
new Story(storyMetadata1, new Scenario(typeof(SadPathScenario), GetFailingExecutionSteps(), "Sad Path Scenario [for Happiness]")),
54-
new Story(storyMetadata1, new Scenario(typeof(SadPathScenario), GetInconclusiveExecutionSteps(), "Inconclusive Scenario [for Happiness]")),
55-
new Story(storyMetadata1, new Scenario(typeof(SadPathScenario), GetNotImplementedExecutionSteps(), "Not Implemented Scenario [for Happiness]")),
56-
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario [with no story]")),
57-
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(SadPathScenario), GetFailingExecutionSteps(), "Sad Path Scenario [with no story]")),
58-
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(SadPathScenario), GetInconclusiveExecutionSteps(), "Inconclusive Scenario [with no story]")),
59-
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(SadPathScenario), GetNotImplementedExecutionSteps(), "Not Implemented Scenario [with no story]")),
52+
new Story(storyMetadata1, new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario [for Happiness]", new List<string>())),
53+
new Story(storyMetadata1, new Scenario(typeof(SadPathScenario), GetFailingExecutionSteps(), "Sad Path Scenario [for Happiness]", new List<string>())),
54+
new Story(storyMetadata1, new Scenario(typeof(SadPathScenario), GetInconclusiveExecutionSteps(), "Inconclusive Scenario [for Happiness]", new List<string>())),
55+
new Story(storyMetadata1, new Scenario(typeof(SadPathScenario), GetNotImplementedExecutionSteps(), "Not Implemented Scenario [for Happiness]", new List<string>())),
56+
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario [with no story]", new List<string>())),
57+
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(SadPathScenario), GetFailingExecutionSteps(), "Sad Path Scenario [with no story]", new List<string>())),
58+
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(SadPathScenario), GetInconclusiveExecutionSteps(), "Inconclusive Scenario [with no story]", new List<string>())),
59+
new Story(testThatReportWorksWithNoStory, new Scenario(typeof(SadPathScenario), GetNotImplementedExecutionSteps(), "Not Implemented Scenario [with no story]", new List<string>())),
6060
new Story(storyMetadata2, GetScenarios(true, true)),
6161
new Story(storyMetadata3, GetScenarios(false, true)),
6262
};
@@ -118,26 +118,26 @@ private Scenario[] GetScenarios(bool includeFailingScenario, bool includeExample
118118
}
119119
return new List<Scenario>
120120
{
121-
new Scenario(exampleId, typeof(ExampleScenario), GetExampleExecutionSteps(), "Example Scenario", exampleTable.ElementAt(0), new List<StepArgument>()),
122-
new Scenario(exampleId, typeof(ExampleScenario), exampleExecutionSteps, "Example Scenario", exampleTable.ElementAt(1), new List<StepArgument>())
121+
new Scenario(exampleId, typeof(ExampleScenario), GetExampleExecutionSteps(), "Example Scenario", exampleTable.ElementAt(0), new List<StepArgument>(), new List<string>()),
122+
new Scenario(exampleId, typeof(ExampleScenario), exampleExecutionSteps, "Example Scenario", exampleTable.ElementAt(1), new List<StepArgument>(), new List<string>())
123123
}.ToArray();
124124
}
125125

126126
return new List<Scenario>
127127
{
128-
new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario"),
129-
new Scenario(typeof(SadPathScenario), sadExecutionSteps, "Sad Path Scenario")
128+
new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario", new List<string>()),
129+
new Scenario(typeof(SadPathScenario), sadExecutionSteps, "Sad Path Scenario", new List<string>())
130130
}.ToArray();
131131
}
132132

133133
private Scenario[] GetOneOfEachScenarioResult()
134134
{
135135
var scenarios = new List<Scenario>
136136
{
137-
new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario"),
138-
new Scenario(typeof(SadPathScenario), GetSadExecutionSteps(), "Sad Path Scenario"),
139-
new Scenario(typeof(SadPathScenario), GetInconclusiveExecutionSteps(), "Inconclusive Scenario"),
140-
new Scenario(typeof(SadPathScenario), GetNotImplementedExecutionSteps(), "Not Implemented Scenario")
137+
new Scenario(typeof(HappyPathScenario), GetHappyExecutionSteps(), "Happy Path Scenario", new List<string>()),
138+
new Scenario(typeof(SadPathScenario), GetSadExecutionSteps(), "Sad Path Scenario", new List<string>()),
139+
new Scenario(typeof(SadPathScenario), GetInconclusiveExecutionSteps(), "Inconclusive Scenario", new List<string>()),
140+
new Scenario(typeof(SadPathScenario), GetNotImplementedExecutionSteps(), "Not Implemented Scenario", new List<string>())
141141
};
142142

143143
// override specific step results - ideally this class could be refactored to provide objectmother/builder interface

TestStack.BDDfy.Tests/Reporters/TextReporter/TextReporterTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Runtime.CompilerServices;
1+
using System.Runtime.CompilerServices;
32
using System.Text;
43
using ApprovalTests;
54
using NUnit.Framework;

0 commit comments

Comments
 (0)