Skip to content

Commit

Permalink
Merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
GiuseppePiscopo committed Aug 3, 2016
1 parent ed82abd commit a8b457a
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 63 deletions.
8 changes: 4 additions & 4 deletions src/NSpec.VsAdapter/NSpec.VsAdapter/NSpec.VsAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
<Reference Include="Microsoft.VisualStudio.TestWindow.Interfaces">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestWindow.Interfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NSpec, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\nspec.1.0.5\lib\NSpec.dll</HintPath>
<Reference Include="NSpec, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\nspec.1.0.7\lib\NSpec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
4 changes: 2 additions & 2 deletions src/NSpec.VsAdapter/NSpec.VsAdapter/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="nspec" version="1.0.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="nspec" version="1.0.7" targetFramework="net45" />
<package id="Rx-Core" version="2.2.5" targetFramework="net45" />
<package id="Rx-Interfaces" version="2.2.5" targetFramework="net45" />
<package id="Rx-Linq" version="2.2.5" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=4.9.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.9.0\lib\net45\FluentAssertions.dll</HintPath>
<Reference Include="FluentAssertions, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.9.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.9.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Reference Include="FluentAssertions.Core, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.ObjectModel">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

Expand All @@ -11,7 +12,13 @@ static class TestConstants
{
static TestConstants()
{
TestFolderPath = TestUtils.FirstCharToUpper(Path.GetFullPath(@"..\..\..\"));
string thisProjectDllPath = Assembly.GetExecutingAssembly().Location;
var dllFileInfo = new FileInfo(thisProjectDllPath);

// move up from 'Test\ProjectDir\Bin\Debug\' to 'Test\'
var testFolderInfo = dllFileInfo.Directory.Parent.Parent.Parent;

TestFolderPath = TestUtils.FirstCharToUpper(testFolderInfo.FullName);

SampleSpecsSourcePath = Path.Combine(TestFolderPath, @"Samples\SampleSpecs\desc_SystemUnderTest.cs");
SampleSpecsDllPath = Path.Combine(TestFolderPath, @"Samples\SampleSpecs\bin\Debug\SampleSpecs.dll");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="4.9.0" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="FluentAssertions" version="4.13.0" targetFramework="net45" />
<package id="NUnit" version="3.4.1" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
<HintPath>..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AutofacContrib.NSubstitute, Version=3.3.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutofacContrib.NSubstitute.3.3.6\lib\NET40\AutofacContrib.NSubstitute.dll</HintPath>
<Reference Include="AutofacContrib.NSubstitute, Version=3.3.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutofacContrib.NSubstitute.3.3.7\lib\NET40\AutofacContrib.NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions, Version=4.9.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.9.0\lib\net45\FluentAssertions.dll</HintPath>
<Reference Include="FluentAssertions, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.9.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.9.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Reference Include="FluentAssertions.Core, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Reactive.Testing, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand All @@ -63,20 +63,20 @@
<Reference Include="Microsoft.VisualStudio.TestWindow.Interfaces">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestWindow.Interfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NSpec, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\nspec.1.0.5\lib\NSpec.dll</HintPath>
<Reference Include="NSpec, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\nspec.1.0.7\lib\NSpec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NSubstitute, Version=1.10.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\..\packages\NSubstitute.1.10.0.0\lib\net45\NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,38 +95,53 @@ public void it_should_not_be_a_win8_metro_test_container()
}

[Test]
[ExpectedException]
public void it_should_throw_with_null_container_discoverer()
{
new NSpecTestContainer(null, sourcePath, debugEngines, fileService);
Assert.That(() =>
{
new NSpecTestContainer(null, sourcePath, debugEngines, fileService);

}, Throws.Exception);
}

[Test]
[ExpectedException]
public void it_should_throw_with_null_source()
{
new NSpecTestContainer(containerDiscoverer, null, debugEngines, fileService);
Assert.That(() =>
{
new NSpecTestContainer(containerDiscoverer, null, debugEngines, fileService);

}, Throws.Exception);
}

[Test]
[ExpectedException]
public void it_should_throw_with_empty_source()
{
new NSpecTestContainer(containerDiscoverer, String.Empty, debugEngines, fileService);
Assert.That(() =>
{
new NSpecTestContainer(containerDiscoverer, String.Empty, debugEngines, fileService);

}, Throws.Exception);
}

[Test]
[ExpectedException]
public void it_should_throw_with_null_engines()
{
new NSpecTestContainer(containerDiscoverer, sourcePath, null, fileService);
Assert.That(() =>
{
new NSpecTestContainer(containerDiscoverer, sourcePath, null, fileService);

}, Throws.Exception);
}

[Test]
[ExpectedException]
public void it_should_throw_with_null_fileservice()
{
new NSpecTestContainer(containerDiscoverer, sourcePath, debugEngines, null);
Assert.That(() =>
{
new NSpecTestContainer(containerDiscoverer, sourcePath, debugEngines, null);

}, Throws.Exception);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="AutofacContrib.NSubstitute" version="3.3.6" targetFramework="net45" />
<package id="FluentAssertions" version="4.9.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="nspec" version="1.0.5" targetFramework="net45" />
<package id="AutofacContrib.NSubstitute" version="3.3.7" targetFramework="net45" />
<package id="FluentAssertions" version="4.13.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="nspec" version="1.0.7" targetFramework="net45" />
<package id="NSubstitute" version="1.10.0.0" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnit" version="3.4.1" targetFramework="net45" />
<package id="Rx-Core" version="2.2.5" targetFramework="net45" />
<package id="Rx-Interfaces" version="2.2.5" targetFramework="net45" />
<package id="Rx-Linq" version="2.2.5" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="NSpec, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.5\lib\NSpec.dll</HintPath>
<Reference Include="NSpec, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.7\lib\NSpec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nspec" version="1.0.5" targetFramework="net45" />
<package id="nspec" version="1.0.7" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="NSpec, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.5\lib\NSpec.dll</HintPath>
<Reference Include="NSpec, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.7\lib\NSpec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Shouldly, Version=2.8.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Shouldly.2.8.0\lib\net40\Shouldly.dll</HintPath>
<Reference Include="Shouldly, Version=2.8.1.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Shouldly.2.8.1\lib\net40\Shouldly.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nspec" version="1.0.5" targetFramework="net45" />
<package id="Shouldly" version="2.8.0" targetFramework="net45" />
<package id="nspec" version="1.0.7" targetFramework="net45" />
<package id="Shouldly" version="2.8.1" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="NSpec, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.5\lib\NSpec.dll</HintPath>
<Reference Include="NSpec, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.7\lib\NSpec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Shouldly, Version=2.8.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Shouldly.2.8.0\lib\net40\Shouldly.dll</HintPath>
<Reference Include="Shouldly, Version=2.8.1.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Shouldly.2.8.1\lib\net40\Shouldly.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nspec" version="1.0.5" targetFramework="net45" />
<package id="Shouldly" version="2.8.0" targetFramework="net45" />
<package id="nspec" version="1.0.7" targetFramework="net45" />
<package id="Shouldly" version="2.8.1" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="NSpec, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.5\lib\NSpec.dll</HintPath>
<Reference Include="NSpec, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\nspec.1.0.7\lib\NSpec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Shouldly, Version=2.8.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Shouldly.2.8.0\lib\net40\Shouldly.dll</HintPath>
<Reference Include="Shouldly, Version=2.8.1.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Shouldly.2.8.1\lib\net40\Shouldly.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
4 changes: 2 additions & 2 deletions src/NSpec.VsAdapter/Test/Samples/SampleSpecs/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="nspec" version="1.0.5" targetFramework="net45" />
<package id="Shouldly" version="2.8.0" targetFramework="net45" />
<package id="nspec" version="1.0.7" targetFramework="net45" />
<package id="Shouldly" version="2.8.1" targetFramework="net45" />
</packages>

0 comments on commit a8b457a

Please sign in to comment.