Skip to content

Commit 66de5ff

Browse files
committed
Added test
1 parent ad2f84b commit 66de5ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

TestStack.BDDfy.Tests/Scanner/FluentScanner/StepTitleTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ public void MethodCallInStepTitle()
2020
.Then(_ => ThenTitleHas(AMethodCall()))
2121
.And(_ => something.Sub.SomethingWithArg("foo"))
2222
.And(_ => something.Sub.SomethingWithArg2("foo"))
23+
.And(_ => something.Sub.SomethingWithArg3("foo"))
2324
.BDDfy();
2425

2526
story.Scenarios.Single().Steps.ElementAt(2).Title.ShouldBe("And different title");
2627
story.Scenarios.Single().Steps.ElementAt(3).Title.ShouldBe("Then title has Mutated state");
2728
story.Scenarios.Single().Steps.ElementAt(4).Title.ShouldBe("And with arg foo");
2829
story.Scenarios.Single().Steps.ElementAt(5).Title.ShouldBe("And with arg");
30+
story.Scenarios.Single().Steps.ElementAt(6).Title.ShouldBe("And with foo arg");
2931
}
3032

3133
public class FooClass
@@ -59,6 +61,11 @@ public void SomethingWithArg(string arg)
5961
public void SomethingWithArg2(string arg)
6062
{
6163
}
64+
65+
[StepTitle("With {0} arg", false)]
66+
public void SomethingWithArg3(string arg)
67+
{
68+
}
6269
}
6370

6471
private string AMethodCall()

0 commit comments

Comments
 (0)