@@ -11,6 +11,7 @@ public class StoryAttributeMetadataScanner : IStoryMetadataScanner
1111 private const string I_want_prefix = "I want" ;
1212 private const string So_that_prefix = "So that" ;
1313 private const string As_a_prefix = "As a" ;
14+ private const string In_order_to_prefix = "In order to" ;
1415 // ReSharper restore InconsistentNaming
1516
1617 public virtual StoryMetadata Scan ( object testObject , Type explicitStoryType = null )
@@ -47,9 +48,20 @@ static StoryMetadata CreateStoryMetadata(Type storyType, StoryAttribute storyAtt
4748 if ( string . IsNullOrEmpty ( title ) )
4849 title = NetToString . Convert ( storyType . Name ) ;
4950
50- var narrative1 = CleanseProperty ( storyAttribute . AsA , As_a_prefix ) ;
51- var narrative2 = CleanseProperty ( storyAttribute . IWant , I_want_prefix ) ;
52- var narrative3 = CleanseProperty ( storyAttribute . SoThat , So_that_prefix ) ;
51+ string narrative1 , narrative2 , narrative3 ;
52+
53+ if ( ! string . IsNullOrWhiteSpace ( storyAttribute . InOrderTo ) )
54+ {
55+ narrative1 = CleanseProperty ( storyAttribute . InOrderTo , In_order_to_prefix ) ;
56+ narrative2 = CleanseProperty ( storyAttribute . AsA , As_a_prefix ) ;
57+ narrative3 = CleanseProperty ( storyAttribute . IWant , I_want_prefix ) ;
58+ }
59+ else
60+ {
61+ narrative1 = CleanseProperty ( storyAttribute . AsA , As_a_prefix ) ;
62+ narrative2 = CleanseProperty ( storyAttribute . IWant , I_want_prefix ) ;
63+ narrative3 = CleanseProperty ( storyAttribute . SoThat , So_that_prefix ) ;
64+ }
5365
5466 return new StoryMetadata ( storyType , narrative1 , narrative2 , narrative3 , title ) ;
5567 }
0 commit comments