Skip to content

Commit 3b7b94e

Browse files
committed
renamed ExecutionStep to Step & its StepTitle to Title
1 parent 87eb80d commit 3b7b94e

29 files changed

Lines changed: 143 additions & 143 deletions

Samples/TestStack.BDDfy.Samples/CustomTextReporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void Process(Story story)
5959
scenarioReport.AppendLine();
6060

6161
foreach (var step in scenario.Steps)
62-
scenarioReport.AppendLine(string.Format(" [{1}] {0}", step.StepTitle, step.Result));
62+
scenarioReport.AppendLine(string.Format(" [{1}] {0}", step.Title, step.Result));
6363

6464
scenarioReport.AppendLine("--------------------------------------------------------------------------------");
6565
scenarioReport.AppendLine();

TestStack.BDDfy.Tests/Exceptions/ExceptionThrowingTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,35 +86,35 @@ private void SetThrowingStep(ThrowingMethods methodToThrow)
8686
}
8787
}
8888

89-
private ExecutionStep GetStep(string stepTitle)
89+
private Step GetStep(string stepTitle)
9090
{
91-
return _scenario.Steps.First(s => s.StepTitle == stepTitle);
91+
return _scenario.Steps.First(s => s.Title == stepTitle);
9292
}
9393

94-
ExecutionStep GivenStep
94+
Step GivenStep
9595
{
9696
get
9797
{
9898
return GetStep("Given");
9999
}
100100
}
101101

102-
ExecutionStep WhenStep
102+
Step WhenStep
103103
{
104104
get {
105105
return GetStep("When");
106106
}
107107
}
108108

109-
ExecutionStep ThenStep
109+
Step ThenStep
110110
{
111111
get
112112
{
113113
return GetStep("Then");
114114
}
115115
}
116116

117-
ExecutionStep TearDownStep
117+
Step TearDownStep
118118
{
119119
get
120120
{

TestStack.BDDfy.Tests/Exceptions/WhenAnInconclusiveTestIsRun.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,35 @@ public void TearDownThis()
3030
Engine _engine;
3131
private Scenario _scenario;
3232

33-
ExecutionStep GivenStep
33+
Step GivenStep
3434
{
3535
get
3636
{
37-
return _scenario.Steps.Single(s => s.StepTitle == "Given a class under test");
37+
return _scenario.Steps.Single(s => s.Title == "Given a class under test");
3838
}
3939
}
4040

41-
ExecutionStep WhenStep
41+
Step WhenStep
4242
{
4343
get
4444
{
45-
return _scenario.Steps.Single(s => s.StepTitle == "When inconclusive exception is thrown in one of the methods");
45+
return _scenario.Steps.Single(s => s.Title == "When inconclusive exception is thrown in one of the methods");
4646
}
4747
}
4848

49-
ExecutionStep ThenStep
49+
Step ThenStep
5050
{
5151
get
5252
{
53-
return _scenario.Steps.Single(s => s.StepTitle == "Then the context is flagged as inconclusive");
53+
return _scenario.Steps.Single(s => s.Title == "Then the context is flagged as inconclusive");
5454
}
5555
}
5656

57-
ExecutionStep DisposeStep
57+
Step DisposeStep
5858
{
5959
get
6060
{
61-
return _scenario.Steps.Single(s => s.StepTitle == "Tear down this");
61+
return _scenario.Steps.Single(s => s.Title == "Tear down this");
6262
}
6363
}
6464

TestStack.BDDfy.Tests/FluentScanner/ScenarioToBeScannedUsingFluentScanner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void AndIncorrectAttributeWouldNotMatter()
7171
public void Dispose()
7272
{}
7373

74-
public static IEnumerable<ExecutionStep> GetSteps(ScenarioToBeScannedUsingFluentScanner testObject)
74+
public static IEnumerable<Step> GetSteps(ScenarioToBeScannedUsingFluentScanner testObject)
7575
{
7676
var fluentScanner = testObject
7777
.Given(s => s.GivenSomeState(1, 2))

TestStack.BDDfy.Tests/FluentScanner/WhenStepsAreScannedUsingFluentScanner.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace TestStack.BDDfy.Tests.FluentScanner
77
[TestFixture]
88
public class WhenStepsAreScannedUsingFluentScanner
99
{
10-
private IEnumerable<ExecutionStep> _steps;
10+
private IEnumerable<Step> _steps;
1111

1212
[SetUp]
1313
public void Setup()
@@ -22,11 +22,11 @@ public void IndicatedStepsAreReturned()
2222
Assert.That(_steps.Count(), Is.EqualTo(12));
2323
}
2424

25-
ExecutionStep GivenSomeStateStep
25+
Step GivenSomeStateStep
2626
{
2727
get
2828
{
29-
return _steps.Single(s => s.StepTitle == "Given some state 1, 2");
29+
return _steps.Single(s => s.Title == "Given some state 1, 2");
3030
}
3131
}
3232

@@ -48,11 +48,11 @@ public void GivenSomeState_StepReports()
4848
Assert.IsTrue(GivenSomeStateStep.ShouldReport);
4949
}
5050

51-
ExecutionStep WhenSomeStepUsesIncompatibleNamingConventionStep
51+
Step WhenSomeStepUsesIncompatibleNamingConventionStep
5252
{
5353
get
5454
{
55-
return _steps.Single(s => s.StepTitle.Trim() == "When some step uses incompatible naming convention");
55+
return _steps.Single(s => s.Title.Trim() == "When some step uses incompatible naming convention");
5656
}
5757
}
5858

@@ -74,11 +74,11 @@ public void WhenSomeStepUsesIncompatibleNamingConvention_Reports()
7474
Assert.IsTrue(WhenSomeStepUsesIncompatibleNamingConventionStep.ShouldReport);
7575
}
7676

77-
ExecutionStep AndAMethodTakesArrayInputsStep
77+
Step AndAMethodTakesArrayInputsStep
7878
{
7979
get
8080
{
81-
return _steps.Single(s => s.StepTitle.Trim() == "And a method takes array inputs 1, 2, 3, 4, 5");
81+
return _steps.Single(s => s.Title.Trim() == "And a method takes array inputs 1, 2, 3, 4, 5");
8282
}
8383
}
8484

@@ -100,11 +100,11 @@ public void AndAMethodTakesArrayInputs_Reports()
100100
Assert.IsTrue(AndAMethodTakesArrayInputsStep.ShouldReport);
101101
}
102102

103-
ExecutionStep WhenSomethingHappensTransitionStep
103+
Step WhenSomethingHappensTransitionStep
104104
{
105105
get
106106
{
107-
return _steps.Single(s => s.StepTitle == "When something happens some input here");
107+
return _steps.Single(s => s.Title == "When something happens some input here");
108108
}
109109
}
110110

@@ -126,11 +126,11 @@ public void WhenSomethingHappensTransitionStep_Reports()
126126
Assert.IsTrue(WhenSomethingHappensTransitionStep.ShouldReport);
127127
}
128128

129-
ExecutionStep WhenSomethingHappensTransitionStepIgnoringInputInStepTitle
129+
Step WhenSomethingHappensTransitionStepIgnoringInputInStepTitle
130130
{
131131
get
132132
{
133-
return _steps.Single(s => s.StepTitle == "When something happens");
133+
return _steps.Single(s => s.Title == "When something happens");
134134
}
135135
}
136136

@@ -152,11 +152,11 @@ public void WhenSomethingHappensTransitionStepIgnoringInputInStepTitle_Reports()
152152
Assert.IsTrue(WhenSomethingHappensTransitionStepIgnoringInputInStepTitle.ShouldReport);
153153
}
154154

155-
ExecutionStep WhenSomethingHappensConsecutiveTransitionStep
155+
Step WhenSomethingHappensConsecutiveTransitionStep
156156
{
157157
get
158158
{
159-
return _steps.Single(s => s.StepTitle.Trim() == "step used with other input for the second time");
159+
return _steps.Single(s => s.Title.Trim() == "step used with other input for the second time");
160160
}
161161
}
162162

@@ -178,11 +178,11 @@ public void WhenSomethingHappensConsecutiveTransitionStep_Reports()
178178
Assert.IsTrue(WhenSomethingHappensConsecutiveTransitionStep.ShouldReport);
179179
}
180180

181-
ExecutionStep AndThenSomethingElseHappensStep
181+
Step AndThenSomethingElseHappensStep
182182
{
183183
get
184184
{
185-
return _steps.Single(s => s.StepTitle.Trim() == "Overriding step name without arguments");
185+
return _steps.Single(s => s.Title.Trim() == "Overriding step name without arguments");
186186
}
187187
}
188188

@@ -204,11 +204,11 @@ public void AndThenSomethingElseHappensStep_Reports()
204204
Assert.IsTrue(AndThenSomethingElseHappensStep.ShouldReport);
205205
}
206206

207-
ExecutionStep ThenTheFollowingAssertionsShouldBeCorrectStep
207+
Step ThenTheFollowingAssertionsShouldBeCorrectStep
208208
{
209209
get
210210
{
211-
return _steps.Single(s => s.StepTitle == "Then the following assertions should be correct");
211+
return _steps.Single(s => s.Title == "Then the following assertions should be correct");
212212
}
213213
}
214214

@@ -230,11 +230,11 @@ public void ThenTheFollowingAssertionsShouldBeCorrectStep_Reports()
230230
Assert.IsTrue(ThenTheFollowingAssertionsShouldBeCorrectStep.ShouldReport);
231231
}
232232

233-
ExecutionStep AndIncorrectAttributeWouldNotMatterStep
233+
Step AndIncorrectAttributeWouldNotMatterStep
234234
{
235235
get
236236
{
237-
return _steps.Single(s => s.StepTitle.Trim() == "And incorrect attribute would not matter");
237+
return _steps.Single(s => s.Title.Trim() == "And incorrect attribute would not matter");
238238
}
239239
}
240240

@@ -256,15 +256,15 @@ public void AndIncorrectAttributeWouldNotMatterStep_Reports()
256256
Assert.IsTrue(AndIncorrectAttributeWouldNotMatterStep.ShouldReport);
257257
}
258258

259-
ExecutionStep AndInputsAreFormattedPropertlyInTheTitle
259+
Step AndInputsAreFormattedPropertlyInTheTitle
260260
{
261261
get
262262
{
263263
var formattedTitle = string.Format(
264264
ScenarioToBeScannedUsingFluentScanner.InputDateStepTitleTemplate,
265265
ScenarioToBeScannedUsingFluentScanner.InputDate);
266266

267-
return _steps.Single(s => s.StepTitle.Trim() == formattedTitle);
267+
return _steps.Single(s => s.Title.Trim() == formattedTitle);
268268
}
269269
}
270270

@@ -274,11 +274,11 @@ public void AndInputsAreFormattedPropertlyInTheTitle_IsAConsecutiveAssertingStep
274274
Assert.That(AndInputsAreFormattedPropertlyInTheTitle.ExecutionOrder, Is.EqualTo(ExecutionOrder.ConsecutiveAssertion));
275275
}
276276

277-
ExecutionStep TearDownStep
277+
Step TearDownStep
278278
{
279279
get
280280
{
281-
return _steps.Single(s => s.StepTitle == "Dispose");
281+
return _steps.Single(s => s.Title == "Dispose");
282282
}
283283
}
284284

TestStack.BDDfy.Tests/Reporters/ReportTestData.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ private Scenario[] GetScenarios()
2828
return scenarios.ToArray();
2929
}
3030

31-
private IEnumerable<ExecutionStep> GetHappyExecutionSteps()
31+
private IEnumerable<Step> GetHappyExecutionSteps()
3232
{
33-
var steps = new List<ExecutionStep>()
33+
var steps = new List<Step>()
3434
{
35-
new ExecutionStep(null, "Given a positive account balance", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
36-
new ExecutionStep(null, "When the account holder requests money", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
37-
new ExecutionStep(null, "Then money is dispensed", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
35+
new Step(null, "Given a positive account balance", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
36+
new Step(null, "When the account holder requests money", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
37+
new Step(null, "Then money is dispensed", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
3838
};
3939
return steps;
4040
}
4141

42-
private IEnumerable<ExecutionStep> GetSadExecutionSteps()
42+
private IEnumerable<Step> GetSadExecutionSteps()
4343
{
44-
var steps = new List<ExecutionStep>()
44+
var steps = new List<Step>()
4545
{
46-
new ExecutionStep(null, "Given a negative account balance", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
47-
new ExecutionStep(null, "When the account holder requests money", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
48-
new ExecutionStep(null, "Then no money is dispensed", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
46+
new Step(null, "Given a negative account balance", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
47+
new Step(null, "When the account holder requests money", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
48+
new Step(null, "Then no money is dispensed", true, ExecutionOrder.Assertion, true) {Duration = new TimeSpan(0, 0, 0, 0, 5)},
4949
};
5050
return steps;
5151
}

0 commit comments

Comments
 (0)