Skip to content

Commit

Permalink
fixes in reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
gasparnagy committed Nov 11, 2009
1 parent b1415d2 commit cb37bfd
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Reporting/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,21 @@ static void Main(string[] args)
public static void StepDefinitionReport(
[Required] string projectFile,
[Optional("bin\\Debug")] string binFolder,
[Optional("StepDefinitionReport.html", "out")] string outputFile,
[Optional(null, "features")] string[] featureFiles
[Optional("StepDefinitionReport.html", "out")] string outputFile
)
{
SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile);

bool onlySelectedFeatures = featureFiles != null && featureFiles.Length > 0;

List<Feature> parsedFeatures = onlySelectedFeatures ?
ParserHelper.GetParsedFeatures(featureFiles) :
ParserHelper.GetParsedFeatures(specFlowProject);
List<Feature> parsedFeatures = ParserHelper.GetParsedFeatures(specFlowProject);

var basePath = Path.Combine(specFlowProject.ProjectFolder, binFolder);
List<BindingInfo> bindings = BindingCollector.CollectBindings(specFlowProject, basePath);

StepDefinitionReportGenerator generator = new StepDefinitionReportGenerator(specFlowProject, bindings, parsedFeatures,
!onlySelectedFeatures, onlySelectedFeatures);
true, false);
generator.GenerateReport();

string outputFilePath = Path.Combine(basePath, outputFile);
string outputFilePath = Path.GetFullPath(outputFile);
generator.TransformReport(outputFilePath);
}

Expand Down

0 comments on commit cb37bfd

Please sign in to comment.