From 01bf47170fdb848f4ced623b1fad7450c8848d64 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 18 Aug 2017 10:43:19 -0700 Subject: [PATCH] Revert lineups change until we work out issues with PackageLineup This reverts commit a2c0410e39a05bf646d1a042ec2284af37847b1b. --- Directory.Build.props | 14 ----------- Directory.Build.targets | 14 ----------- JsonPatch.sln | 25 +------------------ .appveyor.yml => appveyor.yml | 0 build/common.props | 24 ++++++++++++++++++ build/dependencies.props | 14 +++++++++++ build/repo.props | 6 ----- src/Directory.Build.props | 7 ------ .../Microsoft.AspNetCore.JsonPatch.csproj | 7 +++--- test/Directory.Build.props | 11 -------- .../DictionaryAdapterTest.cs | 14 +++++------ ...Microsoft.AspNetCore.JsonPatch.Test.csproj | 9 +++++-- .../ObjectAdapterTests.cs | 8 +++--- 13 files changed, 61 insertions(+), 92 deletions(-) delete mode 100644 Directory.Build.props delete mode 100644 Directory.Build.targets rename .appveyor.yml => appveyor.yml (100%) create mode 100644 build/common.props create mode 100644 build/dependencies.props delete mode 100644 build/repo.props delete mode 100644 src/Directory.Build.props delete mode 100644 test/Directory.Build.props diff --git a/Directory.Build.props b/Directory.Build.props deleted file mode 100644 index 57d9ef7e6a..0000000000 --- a/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Microsoft ASP.NET Core - https://github.com/aspnet/JsonPatch - git - $(MSBuildThisFileDirectory)build\Key.snk - true - true - $(VersionSuffix)-$(BuildNumber) - true - - diff --git a/Directory.Build.targets b/Directory.Build.targets deleted file mode 100644 index 9989b1046b..0000000000 --- a/Directory.Build.targets +++ /dev/null @@ -1,14 +0,0 @@ - - - - <_BootstrapperFile Condition=" $([MSBuild]::IsOSUnixLike()) ">build.sh - <_BootstrapperFile Condition="! $([MSBuild]::IsOSUnixLike()) ">build.cmd - <_BootstrapperError> - Package references have not been pinned. Run './$(_BootstrapperFile) /t:Pin'. - Also, you can run './$(_BootstrapperFile) /t:Restore' which will pin *and* restore packages. '$(_BootstrapperFile)' can be found in '$(MSBuildThisFileDirectory)'. - - - - - - diff --git a/JsonPatch.sln b/JsonPatch.sln index 87b48a8ea1..b75721a487 100644 --- a/JsonPatch.sln +++ b/JsonPatch.sln @@ -1,16 +1,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26815.3 +VisualStudioVersion = 15.0.26222.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{430B59ED-F960-4D3A-8FFE-3370008E168D}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{36CD6341-AB44-44EB-B3AA-BF98C89FECDD}" - ProjectSection(SolutionItems) = preProject - test\Directory.Build.props = test\Directory.Build.props - EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.JsonPatch", "src\Microsoft.AspNetCore.JsonPatch\Microsoft.AspNetCore.JsonPatch.csproj", "{4D55F4D8-633B-462F-A5B1-FEB84BD2D534}" EndProject @@ -18,21 +12,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.JsonPa EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C430C499-382D-47BD-B351-CF8F89C08CD2}" ProjectSection(SolutionItems) = preProject - .appveyor.yml = .appveyor.yml - .gitattributes = .gitattributes - .gitignore = .gitignore - .travis.yml = .travis.yml - build.cmd = build.cmd - build.ps1 = build.ps1 - build.sh = build.sh - CONTRIBUTING.md = CONTRIBUTING.md - Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets - LICENSE.txt = LICENSE.txt NuGet.config = NuGet.config - NuGetPackageVerifier.json = NuGetPackageVerifier.json - README.md = README.md - version.xml = version.xml EndProjectSection EndProject Global @@ -57,7 +37,4 @@ Global {4D55F4D8-633B-462F-A5B1-FEB84BD2D534} = {430B59ED-F960-4D3A-8FFE-3370008E168D} {81C20848-E063-4E12-AC40-0B55A532C16C} = {36CD6341-AB44-44EB-B3AA-BF98C89FECDD} EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9FFA3EB9-8740-4434-BC8C-F3D595161B59} - EndGlobalSection EndGlobal diff --git a/.appveyor.yml b/appveyor.yml similarity index 100% rename from .appveyor.yml rename to appveyor.yml diff --git a/build/common.props b/build/common.props new file mode 100644 index 0000000000..b749c350f1 --- /dev/null +++ b/build/common.props @@ -0,0 +1,24 @@ + + + + + + Microsoft ASP.NET Core + https://github.com/aspnet/JsonPatch + git + $(MSBuildThisFileDirectory)Key.snk + true + true + $(VersionSuffix)-$(BuildNumber) + true + + + + + + + + + + + diff --git a/build/dependencies.props b/build/dependencies.props new file mode 100644 index 0000000000..f2fb071ace --- /dev/null +++ b/build/dependencies.props @@ -0,0 +1,14 @@ + + + 2.1.0-* + 4.4.0-* + 2.1.1-* + 10.0.1 + 4.7.49 + 2.0.0-* + 2.0.0-* + 2.0.0-* + 15.3.0-* + 2.3.0-beta2-* + + diff --git a/build/repo.props b/build/repo.props deleted file mode 100644 index c5d91e8a2c..0000000000 --- a/build/repo.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index 5236edee58..0000000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/Microsoft.AspNetCore.JsonPatch/Microsoft.AspNetCore.JsonPatch.csproj b/src/Microsoft.AspNetCore.JsonPatch/Microsoft.AspNetCore.JsonPatch.csproj index a364de22ef..e9732e8621 100644 --- a/src/Microsoft.AspNetCore.JsonPatch/Microsoft.AspNetCore.JsonPatch.csproj +++ b/src/Microsoft.AspNetCore.JsonPatch/Microsoft.AspNetCore.JsonPatch.csproj @@ -1,4 +1,5 @@ + ASP.NET Core support for JSON PATCH. @@ -9,9 +10,9 @@ - - - + + + diff --git a/test/Directory.Build.props b/test/Directory.Build.props deleted file mode 100644 index 31ed7dd07c..0000000000 --- a/test/Directory.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/test/Microsoft.AspNetCore.JsonPatch.Test/DictionaryAdapterTest.cs b/test/Microsoft.AspNetCore.JsonPatch.Test/DictionaryAdapterTest.cs index bc50b872a2..6a88bd6cc7 100644 --- a/test/Microsoft.AspNetCore.JsonPatch.Test/DictionaryAdapterTest.cs +++ b/test/Microsoft.AspNetCore.JsonPatch.Test/DictionaryAdapterTest.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal // Assert Assert.True(addStatus); Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); - Assert.Single(dictionary); + Assert.Equal(1, dictionary.Count); Assert.Equal("James", dictionary[nameKey]); } @@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal // Assert Assert.True(addStatus); Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); - Assert.Single(dictionary); + Assert.Equal(1, dictionary.Count); Assert.Equal("James", dictionary[nameKey]); // Act @@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal // Assert Assert.True(addStatus); Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); - Assert.Single(dictionary); + Assert.Equal(1, dictionary.Count); Assert.Equal("James", dictionary[nameKey]); // Act @@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal // Assert Assert.True(replaceStatus); Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); - Assert.Single(dictionary); + Assert.Equal(1, dictionary.Count); Assert.Equal("James", dictionary[nameKey]); } @@ -129,7 +129,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal Assert.Equal( string.Format("The target location specified by path segment '{0}' was not found.", nameKey), message); - Assert.Empty(dictionary); + Assert.Equal(0, dictionary.Count); } [Fact] @@ -150,7 +150,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal Assert.Equal( string.Format("The target location specified by path segment '{0}' was not found.", nameKey), message); - Assert.Empty(dictionary); + Assert.Equal(0, dictionary.Count); } [Fact] @@ -170,7 +170,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal //Assert Assert.True(removeStatus); Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); - Assert.Empty(dictionary); + Assert.Equal(0, dictionary.Count); } } } diff --git a/test/Microsoft.AspNetCore.JsonPatch.Test/Microsoft.AspNetCore.JsonPatch.Test.csproj b/test/Microsoft.AspNetCore.JsonPatch.Test/Microsoft.AspNetCore.JsonPatch.Test.csproj index 2e4f68b538..f5b8c8268a 100644 --- a/test/Microsoft.AspNetCore.JsonPatch.Test/Microsoft.AspNetCore.JsonPatch.Test.csproj +++ b/test/Microsoft.AspNetCore.JsonPatch.Test/Microsoft.AspNetCore.JsonPatch.Test.csproj @@ -1,5 +1,7 @@  + + netcoreapp2.0;net461 netcoreapp2.0 @@ -10,8 +12,11 @@ - - + + + + + diff --git a/test/Microsoft.AspNetCore.JsonPatch.Test/ObjectAdapterTests.cs b/test/Microsoft.AspNetCore.JsonPatch.Test/ObjectAdapterTests.cs index 34a8c97b67..56b25d22be 100644 --- a/test/Microsoft.AspNetCore.JsonPatch.Test/ObjectAdapterTests.cs +++ b/test/Microsoft.AspNetCore.JsonPatch.Test/ObjectAdapterTests.cs @@ -720,8 +720,8 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters var serialized = JsonConvert.SerializeObject(patchDoc); // Assert - Assert.DoesNotContain("operations", serialized); - Assert.DoesNotContain("Operations", serialized); + Assert.False(serialized.Contains("operations")); + Assert.False(serialized.Contains("Operations")); } [Fact] @@ -2061,7 +2061,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters patchDoc.ApplyTo(model); // Assert - Assert.Single(model); + Assert.Equal(1, model.Count); Assert.Equal(expected, model["WA"]); } @@ -2080,7 +2080,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters deserialized.ApplyTo(model); // Assert - Assert.Single(model); + Assert.Equal(1, model.Count); Assert.Equal(expected, model["WA"]); }