@@ -213,18 +213,47 @@ private void AddStep(Expression<Action<TScenario>> stepAction, string stepTextTe
213213 _steps . Add ( new Step ( StepActionFactory . GetStepAction ( action ) , stepTitle , asserts , executionOrder , reports ) ) ;
214214 }
215215
216+ private void AddStep ( Action stepAction , string title , bool asserts , ExecutionOrder executionOrder , bool reports = true )
217+ {
218+ _steps . Add ( new Step ( o => stepAction ( ) , title , asserts , executionOrder , reports ) ) ;
219+ }
220+
216221 public IGiven < TScenario > Given ( Expression < Action < TScenario > > givenStep , string stepTextTemplate = null )
217222 {
218223 AddStep ( givenStep , stepTextTemplate , false , ExecutionOrder . SetupState ) ;
219224 return this ;
220225 }
221226
227+ public IGiven < TScenario > Given ( Action givenStep , string title )
228+ {
229+ AddStep ( givenStep , title , false , ExecutionOrder . SetupState ) ;
230+ return this ;
231+ }
232+
233+ public IGiven < TScenario > Given ( string title )
234+ {
235+ AddStep ( ( ) => { } , title , false , ExecutionOrder . SetupState ) ;
236+ return this ;
237+ }
238+
222239 IWhen < TScenario > IInitialStep < TScenario > . When ( Expression < Action < TScenario > > whenStep , string stepTextTemplate )
223240 {
224241 AddStep ( whenStep , stepTextTemplate , false , ExecutionOrder . Transition ) ;
225242 return this ;
226243 }
227244
245+ IWhen < TScenario > IInitialStep < TScenario > . When ( Action whenStep , string title )
246+ {
247+ AddStep ( whenStep , title , false , ExecutionOrder . Transition ) ;
248+ return this ;
249+ }
250+
251+ IWhen < TScenario > IInitialStep < TScenario > . When ( string title )
252+ {
253+ AddStep ( ( ) => { } , title , false , ExecutionOrder . Transition ) ;
254+ return this ;
255+ }
256+
228257 IGiven < TScenario > IInitialStep < TScenario > . Given ( Expression < Action < TScenario > > givenStep , bool includeInputsInStepTitle )
229258 {
230259 AddStep ( givenStep , null , false , ExecutionOrder . SetupState , includeInputsInStepTitle : includeInputsInStepTitle ) ;
@@ -267,6 +296,18 @@ IAndGiven<TScenario> IGiven<TScenario>.And(Expression<Action<TScenario>> andGive
267296 return this ;
268297 }
269298
299+ IAndGiven < TScenario > IGiven < TScenario > . And ( Action andGivenStep , string title )
300+ {
301+ AddStep ( andGivenStep , title , false , ExecutionOrder . ConsecutiveSetupState ) ;
302+ return this ;
303+ }
304+
305+ IAndGiven < TScenario > IGiven < TScenario > . And ( string title )
306+ {
307+ AddStep ( ( ) => { } , title , false , ExecutionOrder . ConsecutiveSetupState ) ;
308+ return this ;
309+ }
310+
270311 IAndThen < TScenario > IThen < TScenario > . And ( Expression < Action < TScenario > > andThenStep , bool includeInputsInStepTitle )
271312 {
272313 AddStep ( andThenStep , null , true , ExecutionOrder . ConsecutiveAssertion , includeInputsInStepTitle : includeInputsInStepTitle ) ;
@@ -279,6 +320,18 @@ IThen<TScenario> IWhen<TScenario>.Then(Expression<Action<TScenario>> thenStep, s
279320 return this ;
280321 }
281322
323+ IThen < TScenario > IWhen < TScenario > . Then ( Action thenStep , string title )
324+ {
325+ AddStep ( thenStep , title , true , ExecutionOrder . Assertion ) ;
326+ return this ;
327+ }
328+
329+ IThen < TScenario > IWhen < TScenario > . Then ( string title )
330+ {
331+ AddStep ( ( ) => { } , title , true , ExecutionOrder . Assertion ) ;
332+ return this ;
333+ }
334+
282335 IWhen < TScenario > IGiven < TScenario > . When ( Expression < Action < TScenario > > whenStep , bool includeInputsInStepTitle )
283336 {
284337 AddStep ( whenStep , null , false , ExecutionOrder . Transition , includeInputsInStepTitle : includeInputsInStepTitle ) ;
@@ -309,6 +362,42 @@ IAndThen<TScenario> IThen<TScenario>.And(Expression<Action<TScenario>> andThenSt
309362 return this ;
310363 }
311364
365+ IAndWhen < TScenario > IWhen < TScenario > . And ( Action andWhenStep , string title )
366+ {
367+ AddStep ( andWhenStep , title , false , ExecutionOrder . ConsecutiveTransition ) ;
368+ return this ;
369+ }
370+
371+ IAndWhen < TScenario > IWhen < TScenario > . And ( string title )
372+ {
373+ AddStep ( ( ) => { } , title , false , ExecutionOrder . ConsecutiveTransition ) ;
374+ return this ;
375+ }
376+
377+ IWhen < TScenario > IGiven < TScenario > . When ( Action whenStep , string title )
378+ {
379+ AddStep ( whenStep , title , false , ExecutionOrder . Transition ) ;
380+ return this ;
381+ }
382+
383+ IWhen < TScenario > IGiven < TScenario > . When ( string title )
384+ {
385+ AddStep ( ( ) => { } , title , false , ExecutionOrder . Transition ) ;
386+ return this ;
387+ }
388+
389+ IAndThen < TScenario > IThen < TScenario > . And ( Action andThenStep , string title )
390+ {
391+ AddStep ( andThenStep , title , true , ExecutionOrder . ConsecutiveAssertion ) ;
392+ return this ;
393+ }
394+
395+ IAndThen < TScenario > IThen < TScenario > . And ( string title )
396+ {
397+ AddStep ( ( ) => { } , title , true , ExecutionOrder . ConsecutiveAssertion ) ;
398+ return this ;
399+ }
400+
312401 IFluentScanner < TScenario > IFluentScanner < TScenario > . TearDownWith ( Expression < Action < TScenario > > tearDownStep )
313402 {
314403 AddStep ( tearDownStep , null , false , ExecutionOrder . TearDown , false ) ;
0 commit comments