Skip to content

Commit

Permalink
Merge pull request #67 from dirkrombauts/master
Browse files Browse the repository at this point in the history
Make Pickles UI generate each selected output format once
  • Loading branch information
dirkrombauts committed Oct 16, 2013
2 parents 7521009 + b5aa957 commit 90c2be8
Show file tree
Hide file tree
Showing 18 changed files with 1,053 additions and 1,016 deletions.
953 changes: 488 additions & 465 deletions src/Pickles/Pickles.CommandLine/NLog.xsd

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@
<HintPath>..\packages\NDesk.Options.0.2.1\lib\NDesk.Options.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.0.1.2\lib\net35\NLog.dll</HintPath>
<HintPath>..\packages\NLog.2.1.0\lib\net35\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=1.4.0.66, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IO.Abstractions.1.4.0.66\lib\net35\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions">
<HintPath>..\packages\System.IO.Abstractions.1.4.0.68\lib\net35\System.IO.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
7 changes: 4 additions & 3 deletions src/Pickles/Pickles.CommandLine/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<packages>
<package id="Autofac" version="2.6.3.862" targetFramework="net35" />
<package id="NDesk.Options" version="0.2.1" />
<package id="NLog" version="2.0.1.2" targetFramework="net35" />
<package id="NLog.Config" version="2.0.1.2" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.66" targetFramework="net35" />
<package id="NLog" version="2.1.0" targetFramework="net35" />
<package id="NLog.Config" version="2.1.0" targetFramework="net35" />
<package id="NLog.Schema" version="2.1.0" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.68" targetFramework="net35" />
</packages>
5 changes: 2 additions & 3 deletions src/Pickles/Pickles.MSBuild/Pickles.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
<Reference Include="Microsoft.Build.Utilities.v3.5" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=1.4.0.66, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IO.Abstractions.1.4.0.66\lib\net35\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions">
<HintPath>..\packages\System.IO.Abstractions.1.4.0.68\lib\net35\System.IO.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="2.6.3.862" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.66" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.68" targetFramework="net35" />
</packages>
5 changes: 2 additions & 3 deletions src/Pickles/Pickles.NAnt/Pickles.NAnt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=1.4.0.66, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IO.Abstractions.1.4.0.66\lib\net35\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions">
<HintPath>..\packages\System.IO.Abstractions.1.4.0.68\lib\net35\System.IO.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.NAnt/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="2.6.3.862" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.66" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.68" targetFramework="net35" />
</packages>
5 changes: 2 additions & 3 deletions src/Pickles/Pickles.PowerShell/Pickles.PowerShell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=1.4.0.66, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IO.Abstractions.1.4.0.66\lib\net35\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions">
<HintPath>..\packages\System.IO.Abstractions.1.4.0.68\lib\net35\System.IO.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Management.Automation" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.PowerShell/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="2.6.3.862" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.66" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.68" targetFramework="net35" />
</packages>
31 changes: 13 additions & 18 deletions src/Pickles/Pickles.Test/Pickles.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
<Reference Include="Autofac.Configuration">
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET35\Autofac.Configuration.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.68.1.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClosedXML.0.68.1\lib\net35-client\ClosedXML.dll</HintPath>
<Reference Include="ClosedXML">
<HintPath>..\packages\ClosedXML.0.69.2\lib\net35-client\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="gherkin">
<HintPath>..\packages\gherkin.2.9.0\lib\gherkin.dll</HintPath>
Expand Down Expand Up @@ -86,17 +85,18 @@
<Reference Include="IKVM.Reflection">
<HintPath>..\packages\IKVM.0.46.0.1\lib\net20\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net35\Newtonsoft.Json.dll</HintPath>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.1.1309.1617\lib\net35\Moq.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.5.0.7\lib\net35\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NGenerics, Version=1.4.1.0, Culture=neutral, PublicKeyToken=e4b41be133ea7faf, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NGenerics.1.4.1.0\lib\net35\NGenerics.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Should, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -109,13 +109,11 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Abstractions, Version=1.4.0.66, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IO.Abstractions.1.4.0.66\lib\net35\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions">
<HintPath>..\packages\System.IO.Abstractions.1.4.0.68\lib\net35\System.IO.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.IO.Abstractions.TestingHelpers, Version=1.4.0.66, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.IO.Abstractions.TestingHelpers.1.4.0.66\lib\net35\System.IO.Abstractions.TestingHelpers.dll</HintPath>
<Reference Include="System.IO.Abstractions.TestingHelpers">
<HintPath>..\packages\System.IO.Abstractions.TestingHelpers.1.4.0.68\lib\net35\System.IO.Abstractions.TestingHelpers.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down Expand Up @@ -163,9 +161,6 @@
<Reference Include="IKVM.Runtime.JNI, Version=0.46.0.1, Culture=neutral, PublicKeyToken=13235d27fcbfff58">
<HintPath>..\packages\IKVM.0.46.0.1\lib\net20\IKVM.Runtime.JNI.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920">
<HintPath>..\packages\Moq.4.0.10827\lib\NET35\Moq.dll</HintPath>
</Reference>
<Reference Include="TechTalk.SpecFlow">
<HintPath>..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll</HintPath>
</Reference>
Expand Down
13 changes: 6 additions & 7 deletions src/Pickles/Pickles.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="2.6.3.862" targetFramework="net35" />
<package id="ClosedXML" version="0.68.1" targetFramework="net35" />
<package id="ClosedXML" version="0.69.2" targetFramework="net35" />
<package id="DocumentFormat.OpenXml" version="1.0" />
<package id="gherkin" version="2.9.0" targetFramework="net35" />
<package id="IKVM" version="0.46.0.1" />
<package id="Moq" version="4.0.10827" />
<package id="Newtonsoft.Json" version="5.0.6" targetFramework="net35" />
<package id="Moq" version="4.1.1309.1617" targetFramework="net35" />
<package id="Newtonsoft.Json" version="5.0.7" targetFramework="net35" />
<package id="NGenerics" version="1.4.1.0" targetFramework="net35" />
<package id="NUnit" version="2.6.2" targetFramework="net35" />
<package id="NUnit.Runners" version="2.6.2" />
<package id="NUnit" version="2.6.3" targetFramework="net35" />
<package id="Should" version="1.1.20" targetFramework="net35" />
<package id="ShouldFluent" version="1.1.19" targetFramework="net35" />
<package id="SpecFlow" version="1.9.0" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.66" targetFramework="net35" />
<package id="System.IO.Abstractions.TestingHelpers" version="1.4.0.66" targetFramework="net35" />
<package id="System.IO.Abstractions" version="1.4.0.68" targetFramework="net35" />
<package id="System.IO.Abstractions.TestingHelpers" version="1.4.0.68" targetFramework="net35" />
</packages>
34 changes: 17 additions & 17 deletions src/Pickles/Pickles.UserInterface/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,25 +505,25 @@ private void DoGenerate()

private void DoWork()
{
var builder = new ContainerBuilder();
builder.RegisterAssemblyTypes(typeof(Runner).Assembly);
builder.Register<FileSystem>(_ => new FileSystem()).As<IFileSystem>().SingleInstance();
builder.RegisterModule<PicklesModule>();
var container = builder.Build();

var configuration = container.Resolve<Configuration>();
var fileSystem = container.Resolve<IFileSystem>();

configuration.FeatureFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.featureFolder);
configuration.OutputFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.outputFolder);
configuration.SystemUnderTestName = this.projectName;
configuration.SystemUnderTestVersion = this.projectVersion;
configuration.TestResultsFile = this.IncludeTests ? fileSystem.FileInfo.FromFileName(this.testResultsFile) : null;
configuration.TestResultsFormat = this.testResultsFormats.Selected;
configuration.Language = this.selectedLanguage != null ? this.selectedLanguage.TwoLetterISOLanguageName : CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;

foreach (DocumentationFormat documentationFormat in this.documentationFormats.Selected)
{
var builder = new ContainerBuilder();
builder.RegisterAssemblyTypes(typeof(Runner).Assembly);
builder.Register<FileSystem>(_ => new FileSystem()).As<IFileSystem>().SingleInstance();
builder.RegisterModule<PicklesModule>();
var container = builder.Build();

var configuration = container.Resolve<Configuration>();
var fileSystem = container.Resolve<IFileSystem>();

configuration.FeatureFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.featureFolder);
configuration.OutputFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.outputFolder);
configuration.SystemUnderTestName = this.projectName;
configuration.SystemUnderTestVersion = this.projectVersion;
configuration.TestResultsFile = this.IncludeTests ? fileSystem.FileInfo.FromFileName(this.testResultsFile) : null;
configuration.TestResultsFormat = this.testResultsFormats.Selected;
configuration.Language = this.selectedLanguage != null ? this.selectedLanguage.TwoLetterISOLanguageName : CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;

configuration.DocumentationFormat = documentationFormat;
var runner = container.Resolve<Runner>();
runner.Run(container);
Expand Down
Loading

0 comments on commit 90c2be8

Please sign in to comment.