Skip to content

Commit

Permalink
Update Nuget packages (and small fixes) (#310)
Browse files Browse the repository at this point in the history
* Update-Package SpecFlow

* Update-Package Nunit

* ExpectedException is obsolete in nunit3

* Update-Package System.IO.Abstractions.*

* Refactor CurrentScenarioContext to be instance-based and to be injected

* Update-Package MahApps.Metro

* Update-Package AutoMapper

* Update-Package Newtonsoft.Json

* Remove IKVM assembly binding redirects

* Do not use ScenarioContext.Current

* tweak gitignore

* Update GhostDoc file

* Downgrade Automapper to last known good version

* Exclude test project from test coverage

* Edit applicationhost.config
  • Loading branch information
dirkrombauts committed Apr 10, 2016
1 parent ed7658e commit 5a8b860
Show file tree
Hide file tree
Showing 32 changed files with 123 additions and 109 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ packages/Chocolatey/
!src/Pickles/packages/Fody*/build/*
src/Pickles/.vs/config/applicationhost.config
src/Pickles/Pickles/PortabilityAnalysis.html
src/Pickles/.vs/config/applicationhost.config
10 changes: 9 additions & 1 deletion src/Pickles/.vs/config/applicationhost.config
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,15 @@
</site>
<site name="Pickles.BaseDhtmlFiles" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Dev\Code\GitHub\DirkRombauts\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
<virtualDirectory path="/" physicalPath="C:\Dev\PasteAsGherkinTable\Code\GitHub\DirkRombauts\Pickles\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:52000:localhost" />
</bindings>
</site>
<site name="Pickles.BaseDhtmlFiles(1)" id="3">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Dev\PasteAsGherkinTable\Code\GitHub\DirkRombauts\Pickles\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:52000:localhost" />
Expand Down
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.CommandLine/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<package id="NLog" version="4.2.3" targetFramework="net45" />
<package id="NLog.Config" version="4.2.3" targetFramework="net45" />
<package id="NLog.Schema" version="4.2.3" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.MSBuild/Pickles.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<Reference Include="Microsoft.Build.Utilities.v3.5" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
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="3.5.2" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.ObjectModel/Pickles.ObjectModel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.ObjectModel/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.PowerShell/Pickles.PowerShell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Management" />
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="3.5.2" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.Test/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Abstractions" publicKeyToken="d480b5b72fb413da" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.123" newVersion="2.0.0.123" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.124" newVersion="2.0.0.124" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="IKVM.OpenJDK.Text" publicKeyToken="13235d27fcbfff58" culture="neutral" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,25 @@
// --------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Xml.Linq;
using Autofac;

using PicklesDoc.Pickles.ObjectModel;
using TechTalk.SpecFlow;

namespace PicklesDoc.Pickles.Test.DocumentationBuilders.HTML.AutomationLayer
{
public static class CurrentScenarioContext
public class CurrentScenarioContext
{
public static Feature Feature
private Hashtable Current { get; } = new Hashtable();

public Feature Feature
{
get
{
if (ScenarioContext.Current.ContainsKey("Feature"))
if (Current.ContainsKey("Feature"))
{
return ScenarioContext.Current["Feature"] as Feature;
return Current["Feature"] as Feature;
}
else
{
Expand All @@ -45,19 +47,19 @@ public static Feature Feature

set
{
ScenarioContext.Current["Feature"] = value;
Current["Feature"] = value;
}
}

public static IContainer Container { get; set; }
public IContainer Container { get; set; }

public static XElement Html
public XElement Html
{
get
{
if (ScenarioContext.Current.ContainsKey("Html"))
if (Current.ContainsKey("Html"))
{
return ScenarioContext.Current["Html"] as XElement;
return Current["Html"] as XElement;
}
else
{
Expand All @@ -67,7 +69,7 @@ public static XElement Html

set
{
ScenarioContext.Current["Html"] = value;
Current["Html"] = value;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ namespace PicklesDoc.Pickles.Test.DocumentationBuilders.HTML.AutomationLayer
[Binding]
public class Hooks
{
private readonly ScenarioContext scenarioContext;

public Hooks(CurrentScenarioContext currentScenarioContext, ScenarioContext scenarioContext)
{
this.CurrentScenarioContext = currentScenarioContext;
this.scenarioContext = scenarioContext;
}

private CurrentScenarioContext CurrentScenarioContext { get; }

[BeforeScenario]
public void BeforeScenario()
{
Expand All @@ -36,7 +46,7 @@ public void BeforeScenario()
builder.RegisterModule<PicklesModule>();
CurrentScenarioContext.Container = builder.Build();

if (ScenarioContext.Current.ScenarioInfo.Tags.Contains("enableExperimentalFeatures"))
if (this.scenarioContext.ScenarioInfo.Tags.Contains("enableExperimentalFeatures"))
{
var configuration = CurrentScenarioContext.Container.Resolve<IConfiguration>();
configuration.EnableExperimentalFeatures();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ namespace PicklesDoc.Pickles.Test.DocumentationBuilders.HTML.AutomationLayer
[Binding]
public class StepDefinitions
{
public StepDefinitions(CurrentScenarioContext currentScenarioContext)
{
this.CurrentScenarioContext = currentScenarioContext;
}

private CurrentScenarioContext CurrentScenarioContext { get; }

[Given(@"I have this feature description")]
public void GivenIHaveThisFeatureDescription(string multilineText)
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 11 additions & 10 deletions src/Pickles/Pickles.Test/Pickles.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NFluent, Version=1.3.1.0, Culture=neutral, PublicKeyToken=18828b37b84b1437, processorArchitecture=MSIL">
Expand All @@ -67,27 +67,28 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NGenerics.1.4.1.0\lib\net35\NGenerics.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Abstractions.TestingHelpers, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.TestingHelpers.2.0.0.123\lib\net40\System.IO.Abstractions.TestingHelpers.dll</HintPath>
<Reference Include="System.IO.Abstractions.TestingHelpers, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.TestingHelpers.2.0.0.124\lib\net40\System.IO.Abstractions.TestingHelpers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="TechTalk.SpecFlow">
<HintPath>..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll</HintPath>
<Reference Include="TechTalk.SpecFlow, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.2.0.0\lib\net45\TechTalk.SpecFlow.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/Pickles/Pickles.Test/TestResultExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ namespace PicklesDoc.Pickles.Test
public class TestResultExtensionsTests
{
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void Merge_NullReference_ThrowsArgumentNullException()
{
TestResultExtensions.Merge(null);
Check.ThatCode(() => TestResultExtensions.Merge(null)).Throws<ArgumentNullException>();
}

[Test]
Expand Down
Loading

0 comments on commit 5a8b860

Please sign in to comment.