@@ -6,7 +6,6 @@ namespace TestStack.BDDfy.Reporters.Html
66{
77 public class HtmlReportBuilder : IReportBuilder
88 {
9- private Func < DateTime > _dateProvider = ( ) => DateTime . Now ;
109 private HtmlReportViewModel _viewModel ;
1110 readonly StringBuilder _html ;
1211 const int TabIndentation = 2 ;
@@ -43,7 +42,7 @@ private void HtmlHead()
4342 EmbedCssFile ( HtmlReportResources . BDDfy_css_min ) ;
4443 EmbedCssFile ( _viewModel . CustomStylesheet , HtmlReportResources . CustomStylesheetComment ) ;
4544
46- AddLine ( string . Format ( "<title>BDDfy Test Result {0}</title>" , DateProvider ( ) . ToShortDateString ( ) ) ) ;
45+ AddLine ( string . Format ( "<title>BDDfy Test Result {0}</title>" , _viewModel . RunDate . ToShortDateString ( ) ) ) ;
4746 }
4847 }
4948
@@ -129,7 +128,7 @@ private void ResultDetails()
129128 }
130129 }
131130
132- AddLine ( string . Format ( "<p><span>Tested at: {0}</span></p>" , _dateProvider ( ) ) ) ;
131+ AddLine ( string . Format ( "<p><span>Tested at: {0}</span></p>" , _viewModel . RunDate ) ) ;
133132 }
134133 }
135134
@@ -226,7 +225,7 @@ private void AddStoryMetadataAndNarrative(Story story)
226225 }
227226 else
228227 {
229- AddLine ( string . Format ( "<div class='storyTitle'>{0}</div>" , story . Metadata . Title ) ) ;
228+ AddLine ( string . Format ( "<div class='storyTitle'>{0}{1} </div>" , story . Metadata . TitlePrefix , story . Metadata . Title ) ) ;
230229 }
231230
232231 if ( story . Metadata != null && ! string . IsNullOrEmpty ( story . Metadata . Narrative1 ) )
@@ -296,11 +295,5 @@ private void AddHtmlComment(string htmlComment)
296295 _html . AppendFormat ( "/*{0}*/" , htmlComment ) ;
297296 _html . AppendLine ( ) ;
298297 }
299-
300- public Func < DateTime > DateProvider
301- {
302- get { return _dateProvider ; }
303- set { _dateProvider = value ; }
304- }
305298 }
306299}
0 commit comments