public bool IsHtmlPathUnspecifiedOrSpecifiedAndValid(Options options, List<ISpecificationRunListener> listeners) { if (!options.HtmlPath.Equals(string.Empty)) { var reportingListener = new GenerateHtmlReportRunListener(options.HtmlPath, options.ShowTimeInformation); listeners.Add(reportingListener); return true; } return true; }
List<ISpecificationRunListener> SetUpListeners() { List<ISpecificationRunListener> result = new List<ISpecificationRunListener>(); string reportPath = Path.Combine(ReportDirectory, ReportFilename); if (!String.IsNullOrEmpty(reportPath)) { GenerateHtmlReportRunListener htmlReport = new GenerateHtmlReportRunListener(reportPath, IncludeTimeInfo); result.Add(htmlReport); } if (BuildEnvironment.IsTeamCityBuild) { TeamCityRunListener teamCity = new TeamCityRunListener(IoC.Resolve<ITeamCityMessageProvider>(new { taskToUseForLogging = this })); result.Add(teamCity); } return result; }