Skip to content

Commit 2efbc06

Browse files
committed
Bump Json.NET and NUnit dependencies
* Remove NUnit test adapter from nuget dependencies as the 2.x version is not compatible and 3.x is intended to be run with an adapter installed through other means (see new readme) * Correct a failing unit test not compatible with 3.x
1 parent 887ffda commit 2efbc06

6 files changed

Lines changed: 21 additions & 31 deletions

File tree

TinCan/TinCan.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4242
</PropertyGroup>
4343
<ItemGroup>
44-
<Reference Include="Newtonsoft.Json">
45-
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net35\Newtonsoft.Json.dll</HintPath>
44+
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
45+
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
46+
<Private>True</Private>
4647
</Reference>
4748
<Reference Include="System" />
4849
<Reference Include="System.Core" />

TinCan/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net35" />
3+
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net35" />
44
</packages>

TinCanTests/ActivityTest.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ public void TestActivityIdCase()
4040
}
4141

4242
[Test]
43-
[ExpectedException("System.UriFormatException")]
4443
public void TestActivityIdInvalidUri()
4544
{
46-
var activity = new Activity();
47-
string invalid = "foo";
48-
activity.id = invalid;
45+
Assert.Throws<System.UriFormatException>(
46+
() =>
47+
{
48+
var activity = new Activity();
49+
string invalid = "foo";
50+
activity.id = invalid;
51+
}
52+
);
4953
}
5054
}
5155
}

TinCanTests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
These tests are based on NUnit 3 which requires that you have a compatible test adapter to run them. For Visual Studio 2012+ you can install the "NUnit3 Test Adapter" available by going to "Tools" -> "Extensions and Updates" -> "Online" -> "Visual Studio Gallery" and searching for "nunit".

TinCanTests/TinCanTests.csproj

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,13 @@
4444
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4545
</PropertyGroup>
4646
<ItemGroup>
47-
<Reference Include="Newtonsoft.Json">
48-
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net35\Newtonsoft.Json.dll</HintPath>
47+
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
48+
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
49+
<Private>True</Private>
4950
</Reference>
50-
<Reference Include="nunit.core">
51-
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll</HintPath>
52-
<Private>False</Private>
53-
</Reference>
54-
<Reference Include="nunit.core.interfaces">
55-
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.interfaces.dll</HintPath>
56-
<Private>False</Private>
57-
</Reference>
58-
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
59-
<SpecificVersion>False</SpecificVersion>
60-
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
61-
</Reference>
62-
<Reference Include="nunit.util">
63-
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.util.dll</HintPath>
64-
<Private>False</Private>
65-
</Reference>
66-
<Reference Include="NUnit.VisualStudio.TestAdapter">
67-
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
68-
<Private>False</Private>
51+
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
52+
<HintPath>..\packages\NUnit.3.2.0\lib\net20\nunit.framework.dll</HintPath>
53+
<Private>True</Private>
6954
</Reference>
7055
<Reference Include="System" />
7156
<Reference Include="System.XML" />

TinCanTests/packages.config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net35" />
4-
<package id="NUnit" version="2.6.4" targetFramework="net35" />
5-
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net35" />
3+
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net35" />
4+
<package id="NUnit" version="3.2.0" targetFramework="net35" />
65
</packages>

0 commit comments

Comments
 (0)