Skip to content

Commit e6d7101

Browse files
committed
Merge branch 'release-4.0.0'
2 parents 01e21aa + e6c983b commit e6d7101

File tree

60 files changed

+818
-756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+818
-756
lines changed

Packages.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<Import Project="Resource\Build\MSBuild.Community.Tasks.targets" />
44

55
<PropertyGroup>
6+
<Version Condition="$(GitVersion_SemVer)!=''">$(GitVersion_SemVer)</Version>
67
<Version Condition="$(Version)==''">0.0.0.0</Version>
8+
<NuGetVersion Condition="$(GitVersion_MajorMinorPatch)==''">$(Version)</NuGetVersion>
9+
<NuGetVersion Condition="$(GitVersion_MajorMinorPatch)!=''">$(GitVersion_MajorMinorPatch)$(GitVersion_PreReleaseTagWithDash.Replace('.', ''))</NuGetVersion>
710
<BuildPath>$(MSBuildProjectDirectory)\Build</BuildPath>
811
<ArtifactPath>$(BuildPath)\Library</ArtifactPath>
912
<PackageWorkingPath>$(MSBuildProjectDirectory)\PackageBuild</PackageWorkingPath>
@@ -68,7 +71,7 @@
6871
</CreateItem>
6972
<CallTarget Targets="CopyBDDfyLibs;CopyBDDfySampleFiles;CopyNuspecFiles" />
7073
<MakeDir Directories="$(PackageOutput)" ContinueOnError="true"/>
71-
<Exec Command='$(NuGetExe) pack "%(NuGetSpec.FullPath)" -version $(Version)' WorkingDirectory="$(PackageOutput)"/>
74+
<Exec Command='$(NuGetExe) pack "%(NuGetSpec.FullPath)" -version $(NuGetVersion)' WorkingDirectory="$(PackageOutput)"/>
7275
</Target>
7376

7477
<Target Name="Release" DependsOnTargets="Clean;Prepare;Build;Pack"/>

Resource/Build/GitVersion.exe

1.69 MB
Binary file not shown.

Resource/Build/GitVersion.pdb

41.5 KB
Binary file not shown.

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

Lines changed: 28 additions & 41 deletions
Large diffs are not rendered by default.

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

Lines changed: 28 additions & 41 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Story: Text reporter tests
2+
3+
Scenario: Scenario Text
4+
Given a normal length title [Not executed]
5+
When something of normal length happens [Not executed]
6+
Then some long state should be: #Title [Not executed]
7+
8+
Some more stuff which is quite long on the second line
9+
10+
And finally another really long line
11+
And a normal length assertion [Not executed]
12+
13+

TestStack.BDDfy.Tests/Reporters/TextReporter/TextReporterTests.ShouldProduceExpectedReport.approved.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ Story: Unhappy examples
8484
So that I can diagnose what's wrong
8585

8686
Scenario: Example Scenario
87-
Given a <sign> account balance
87+
Given a <sign> account balance
8888
When the account holder requests money
89-
Then money <action> dispensed
89+
Then money <action> dispensed
9090

9191
Examples:
9292
| sign | action | Result | Errors |
@@ -104,9 +104,9 @@ Story: Happy Examples
104104
So that the report is clean and readable
105105

106106
Scenario: Example Scenario
107-
Given a <sign> account balance
107+
Given a <sign> account balance
108108
When the account holder requests money
109-
Then money <action> dispensed
109+
Then money <action> dispensed
110110

111111
Examples:
112112
| sign | action |

TestStack.BDDfy.Tests/Reporters/TextReporter/TextReporterTests.ShouldProduceExpectedTextWithExamples.approved.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
So that I can be happy
55

66
Scenario: Example Scenario
7-
Given a <sign> account balance
7+
Given a <sign> account balance
88
When the account holder requests money
9-
Then money <action> dispensed
9+
Then money <action> dispensed
1010

1111
Examples:
1212
| sign | action |
@@ -20,9 +20,9 @@ Story: Account holder withdraws cash
2020
So that I can get money when the bank is closed
2121

2222
Scenario: Example Scenario
23-
Given a <sign> account balance
23+
Given a <sign> account balance
2424
When the account holder requests money
25-
Then money <action> dispensed
25+
Then money <action> dispensed
2626

2727
Examples:
2828
| sign | action | Result | Errors |

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Runtime.CompilerServices;
1+
using System.Collections.Generic;
2+
using System.Runtime.CompilerServices;
23
using System.Text;
34
using ApprovalTests;
45
using NUnit.Framework;
@@ -42,5 +43,25 @@ public void ShouldProduceExpectedTextWithExamples()
4243

4344
Approvals.Verify(actual.ToString(), StackTraceScrubber.Scrub);
4445
}
46+
47+
[Test]
48+
[MethodImpl(MethodImplOptions.NoInlining)]
49+
public void LongStepName()
50+
{
51+
var textReporter = new TextReporter();
52+
var scenario = new Scenario(typeof(TextReporterTests), new List<Step>
53+
{
54+
new Step(o =>{ }, new StepTitle("Given a normal length title"), false, ExecutionOrder.SetupState, true, new List<StepArgument>()),
55+
new Step(o =>{ }, new StepTitle("When something of normal length happens"), false, ExecutionOrder.Transition, true, new List<StepArgument>()),
56+
new Step(o =>{ }, new StepTitle("Then some long state should be: #Title\r\n\r\nSome more stuff which is quite long on the second line\r\n\r\nAnd finally another really long line"),
57+
true, ExecutionOrder.Assertion, true, new List<StepArgument>()),
58+
new Step(o =>{ }, new StepTitle("And a normal length assertion"), true, ExecutionOrder.ConsecutiveAssertion, true, new List<StepArgument>())
59+
}, "Scenario Text", new List<string>());
60+
textReporter.Process(new Story(new StoryMetadata(typeof(TextReporterTests), new StoryNarrativeAttribute()),
61+
scenario));
62+
var actual = new StringBuilder();
63+
actual.AppendLine(textReporter.ToString());
64+
Approvals.Verify(actual.ToString(), StackTraceScrubber.Scrub);
65+
}
4566
}
4667
}

TestStack.BDDfy.Tests/Scanner/StepScanners/Examples/ExampleTableTests.cs renamed to TestStack.BDDfy.Tests/Scanner/Examples/ExampleTableTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using NUnit.Framework;
44
using Shouldly;
55

6-
namespace TestStack.BDDfy.Tests.Scanner.StepScanners.Examples
6+
namespace TestStack.BDDfy.Tests.Scanner.Examples
77
{
88
[TestFixture]
99
public class ExampleTableTests

0 commit comments

Comments
 (0)