Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/NuGet.BuildTasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Meschter <tom.meschter@microsoft.com>2017-09-28 23:47:47 +0300
committerTom Meschter <tomescht@microsoft.com>2017-09-29 21:19:20 +0300
commit84052003912e2718017e65673c3b72a0dbc083a7 (patch)
tree464933e348bcbadde77e0c7efd558345aab82ec5
parent4ca5435609513f71800ee1685c77a349a3de7206 (diff)
Fix unit tests
A few of the .json asset files used in the unit tests were updated to refer to a newer version of Newtonsoft.Json, but there were a couple of problems with this. 1. The asset files specified to look for the binaries under the "Newtonsoft.Json\current" folder, rather than under the "Newtonsoft.Json\9.0.1" folder. This may be valid for real-world scenarios, but breaks our unit testing setup (which doesn't actually restore packages and basically fakes a file system). This is incidental to what the tests are trying to exercise, so this commit just replaces "current" with 9.0.1. 2. One of the tests verifies the path to a referenced assembly, but the expected path still had the old version number in it. This has now been fixed.
-rw-r--r--src/Microsoft.NuGet.Build.Tasks.Tests/Json/LockFileWithWithSpecifiedPackageFolders.json2
-rw-r--r--src/Microsoft.NuGet.Build.Tasks.Tests/Json/MultipleProjectFileDependencyGroups.json2
-rw-r--r--src/Microsoft.NuGet.Build.Tasks.Tests/PackageFolderTests.cs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/Microsoft.NuGet.Build.Tasks.Tests/Json/LockFileWithWithSpecifiedPackageFolders.json b/src/Microsoft.NuGet.Build.Tasks.Tests/Json/LockFileWithWithSpecifiedPackageFolders.json
index b523b70..b529b16 100644
--- a/src/Microsoft.NuGet.Build.Tasks.Tests/Json/LockFileWithWithSpecifiedPackageFolders.json
+++ b/src/Microsoft.NuGet.Build.Tasks.Tests/Json/LockFileWithWithSpecifiedPackageFolders.json
@@ -18,7 +18,7 @@
"Newtonsoft.Json/9.0.1": {
"sha512": "KGsYQdS2zLH+H8x2cZaSI7e+YZ4SFIbyy1YJQYl6GYBWjf5o4H1A68nxyq+WTyVSOJQ4GqS/DiPE+UseUizgMg==",
"type": "package",
- "path": "newtonsoft.json/current",
+ "path": "newtonsoft.json/9.0.1",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",
diff --git a/src/Microsoft.NuGet.Build.Tasks.Tests/Json/MultipleProjectFileDependencyGroups.json b/src/Microsoft.NuGet.Build.Tasks.Tests/Json/MultipleProjectFileDependencyGroups.json
index 1c1f2df..a14ad6d 100644
--- a/src/Microsoft.NuGet.Build.Tasks.Tests/Json/MultipleProjectFileDependencyGroups.json
+++ b/src/Microsoft.NuGet.Build.Tasks.Tests/Json/MultipleProjectFileDependencyGroups.json
@@ -34,7 +34,7 @@
"Newtonsoft.Json/9.0.1": {
"sha512": "KGsYQdS2zLH+H8x2cZaSI7e+YZ4SFIbyy1YJQYl6GYBWjf5o4H1A68nxyq+WTyVSOJQ4GqS/DiPE+UseUizgMg==",
"type": "package",
- "path": "newtonsoft.json/current",
+ "path": "newtonsoft.json/9.0.1",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",
diff --git a/src/Microsoft.NuGet.Build.Tasks.Tests/PackageFolderTests.cs b/src/Microsoft.NuGet.Build.Tasks.Tests/PackageFolderTests.cs
index 145e469..90b6142 100644
--- a/src/Microsoft.NuGet.Build.Tasks.Tests/PackageFolderTests.cs
+++ b/src/Microsoft.NuGet.Build.Tasks.Tests/PackageFolderTests.cs
@@ -18,7 +18,7 @@ namespace Microsoft.NuGet.Build.Tasks.Tests
runtimeIdentifier: null,
createTemporaryFolderForPackages: false);
- Assert.Equal(@"C:\PackageFolder\newtonsoft.json\8.0.3\lib\net45\Newtonsoft.Json.dll", result.References.Single().ItemSpec);
+ Assert.Equal(@"C:\PackageFolder\newtonsoft.json\9.0.1\lib\net45\Newtonsoft.Json.dll", result.References.Single().ItemSpec);
}
}
}