@@ -11,6 +11,9 @@ namespace TestStack.BDDfy.Tests.FluentScanner
11
11
[ Story ]
12
12
class ScenarioToBeScannedUsingFluentScanner
13
13
{
14
+ internal const string InputDateStepTitleTemplate = "The provided date is {0:MMM d yyyy}" ;
15
+ public static readonly DateTime InputDate = DateTime . Parse ( "2011-10-20" , new CultureInfo ( "en-AU" ) ) ;
16
+
14
17
private string [ ] _input1 ;
15
18
private int [ ] _input2 ;
16
19
private int _input3 ;
@@ -73,8 +76,6 @@ public void Dispose()
73
76
74
77
public static IEnumerable < ExecutionStep > GetSteps ( ScenarioToBeScannedUsingFluentScanner testObject )
75
78
{
76
- var inputDate = DateTime . Parse ( "2011-10-20" , new CultureInfo ( "en-AU" ) ) ;
77
-
78
79
var fluentScanner = testObject
79
80
. Given ( s => s . GivenSomeState ( 1 , 2 ) )
80
81
. And ( s => s . WhenSomeStepUsesIncompatibleNamingConvention ( ) )
@@ -86,7 +87,7 @@ public static IEnumerable<ExecutionStep> GetSteps(ScenarioToBeScannedUsingFluent
86
87
. And ( s => s . WhenSomethingHappens ( "other input" ) , false )
87
88
. Then ( s => s . ThenTheFollowingAssertionsShouldBeCorrect ( ) )
88
89
. And ( s => s . AndIncorrectAttributeWouldNotMatter ( ) )
89
- . And ( s => s . ThenTitleFormatingWorksToo ( inputDate ) , "The provided date is {0:MMM d yyyy}" )
90
+ . And ( s => s . ThenTitleFormatingWorksToo ( InputDate ) , InputDateStepTitleTemplate )
90
91
. TearDownWith ( s => s . Dispose ( ) ) ;
91
92
92
93
return fluentScanner . GetScanner ( null ) . Scan ( ) . Scenarios . SelectMany ( s => s . Steps ) . ToList ( ) ;
0 commit comments