Skip to content

Commit 48857ab

Browse files
author
Jake Ginnivan
committed
Trying to fix failing test
1 parent d3fdac5 commit 48857ab

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

TestStack.BDDfy.Tests/Reporters/ReportApprover.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Text.RegularExpressions;
33
using ApprovalTests;
4-
using TestStack.BDDfy.Configuration;
54
using TestStack.BDDfy.Reporters;
65
using TestStack.BDDfy.Tests.Reporters.Html;
76

@@ -11,10 +10,6 @@ class ReportApprover
1110
{
1211
public static void Approve(Func<FileReportModel> model, IReportBuilder reportBuilder)
1312
{
14-
// somehow the scenario id keeps increasing on TC
15-
// resetting here explicitly
16-
Configurator.IdGenerator.Reset();
17-
1813
// setting the culture to make sure the date is formatted the same on all machines
1914
using (new TemporaryCulture("en-GB"))
2015
{

TestStack.BDDfy.Tests/Setup.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using NUnit.Framework;
2+
using TestStack.BDDfy.Configuration;
3+
4+
namespace TestStack.BDDfy.Tests
5+
{
6+
[SetUpFixture]
7+
public class Setup
8+
{
9+
[SetUp]
10+
public void RunBeforeAnyTests()
11+
{
12+
// somehow the scenario id keeps increasing on TC
13+
// resetting here explicitly
14+
Configurator.IdGenerator.Reset();
15+
}
16+
}
17+
}

TestStack.BDDfy.Tests/TestStack.BDDfy.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
<Compile Include="Scanner\WhenCombinationOfExecutableAttributeAndMethodNamingConventionIsUsed.cs" />
127127
<Compile Include="Scanner\WhenStepsAreDefinedInABaseClass.cs" />
128128
<Compile Include="Scanner\WhenStepsReturnTheirText.cs" />
129+
<Compile Include="Setup.cs" />
129130
<Compile Include="Stories\CanUseACustomStoryAttribute.cs" />
130131
<Compile Include="Stories\WhenStoryAttibuteMissesDuplicateTextsInProperties.cs" />
131132
<Compile Include="Stories\WhenStoryAttibuteMissesSoThatTextInSoThatProperty.cs" />

0 commit comments

Comments
 (0)