diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 0edd1ac..29f0e84 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -5,7 +5,7 @@ on: pull_request: branches: [ main ] env: - JsonDiffPatchSolutionPath: src/SystemTextJson.JsonDiffPatch.sln + JsonDiffPatchSolutionPath: ./SystemTextJson.JsonDiffPatch.sln jobs: build: strategy: diff --git a/.gitignore b/.gitignore index c6347b5..104b544 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Get latest from `dotnet new gitignore` + +# dotenv files +.env # User-specific files *.rsuser @@ -23,6 +26,7 @@ mono_crash.* [Rr]eleases/ x64/ x86/ +[Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ @@ -56,11 +60,17 @@ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ -# .NET Core +# .NET project.lock.json project.fragment.lock.json artifacts/ +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + # StyleCop StyleCopReport.xml @@ -86,6 +96,7 @@ StyleCopReport.xml *.tmp_proj *_wpftmp.csproj *.log +*.tlog *.vspscc *.vssscc .builds @@ -137,6 +148,11 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + # Visual Studio code coverage results *.coverage *.coveragexml @@ -284,6 +300,17 @@ node_modules/ # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts @@ -340,6 +367,9 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ +# Visual Studio History (VSHistory) files +.vshistory/ + # BeatPulse healthcheck temp database healthchecksdb @@ -349,5 +379,106 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ -# Rider -.idea/ +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4c8b8b0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + "recommendations": [ + "davidanson.vscode-markdownlint", + "dotjoshjohnson.xml", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.vscode-pull-request-github", + "jebbs.markdown-extended", + "jrieken.md-navigate", + "ms-dotnettools.csdevkit", + "yzhang.markdown-all-in-one" + ] +} diff --git a/SystemTextJson.JsonDiffPatch.sln b/SystemTextJson.JsonDiffPatch.sln new file mode 100644 index 0000000..2a6568a --- /dev/null +++ b/SystemTextJson.JsonDiffPatch.sln @@ -0,0 +1,136 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3707B7E8-C345-4F67-9C37-56FF2A62B720}" + ProjectSection(SolutionItems) = preProject + .gitignore = .gitignore + Benchmark.md = Benchmark.md + global.json = global.json + icon.png = icon.png + LICENSE = LICENSE + README.md = README.md + ReleaseNotes.md = ReleaseNotes.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{E9160ECA-64C8-44AC-8172-3CE535FCF02C}" + ProjectSection(SolutionItems) = preProject + .config\dotnet-tools.json = .config\dotnet-tools.json + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{2E4C38DE-0426-40A2-AB0B-507BF6F5B0A6}" + ProjectSection(SolutionItems) = preProject + .github\CODEOWNERS = .github\CODEOWNERS + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3B8ADCDE-F7B8-41BD-8415-B0C1DEF1BB93}" + ProjectSection(SolutionItems) = preProject + .github\workflows\build-and-test.yaml = .github\workflows\build-and-test.yaml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{29B23CE8-F9BF-49CD-873D-4786A081A29B}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch", "src\SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj", "{2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Xunit", "src\SystemTextJson.JsonDiffPatch.Xunit\SystemTextJson.JsonDiffPatch.Xunit.csproj", "{8CC0FE2E-297C-4427-8B66-B50E867823C3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.MSTest", "src\SystemTextJson.JsonDiffPatch.MSTest\SystemTextJson.JsonDiffPatch.MSTest.csproj", "{B2E4B8B6-9F55-4C99-8968-43144BEB809B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.NUnit", "src\SystemTextJson.JsonDiffPatch.NUnit\SystemTextJson.JsonDiffPatch.NUnit.csproj", "{194DF788-2210-444E-826B-C3A6C10F14F7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AE524BA2-D5E2-4D5F-BC95-9AA064D46234}" + ProjectSection(SolutionItems) = preProject + test\Directory.Build.props = test\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{2066569A-C60A-42F6-B10A-C2F0D80143A3}" + ProjectSection(SolutionItems) = preProject + test\Examples\demo_diff.json = test\Examples\demo_diff.json + test\Examples\demo_diff_jsonpatch.json = test\Examples\demo_diff_jsonpatch.json + test\Examples\demo_diff_notext.json = test\Examples\demo_diff_notext.json + test\Examples\demo_left.json = test\Examples\demo_left.json + test\Examples\demo_right.json = test\Examples\demo_right.json + test\Examples\large_diff.json = test\Examples\large_diff.json + test\Examples\large_diff_jsonpatch.json = test\Examples\large_diff_jsonpatch.json + test\Examples\large_diff_notext.json = test\Examples\large_diff_notext.json + test\Examples\large_left.json = test\Examples\large_left.json + test\Examples\large_right.json = test\Examples\large_right.json + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.UnitTests", "test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj", "{832E60B1-0225-48B3-9AAD-638A0F5AA15E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Benchmark", "test\SystemTextJson.JsonDiffPatch.Benchmark\SystemTextJson.JsonDiffPatch.Benchmark.csproj", "{0F173CC9-EA04-4243-A506-E2C59C905A5E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Xunit.Tests", "test\SystemTextJson.JsonDiffPatch.Xunit.Tests\SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj", "{5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.MSTest.Tests", "test\SystemTextJson.JsonDiffPatch.MSTest.Tests\SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj", "{B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.NUnit.Tests", "test\SystemTextJson.JsonDiffPatch.NUnit.Tests\SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj", "{7FAB51DE-6ED6-4CCA-887C-DB8274237E92}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Release|Any CPU.Build.0 = Release|Any CPU + {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Release|Any CPU.Build.0 = Release|Any CPU + {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Release|Any CPU.Build.0 = Release|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.Build.0 = Release|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.Build.0 = Release|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.Build.0 = Release|Any CPU + {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Release|Any CPU.Build.0 = Release|Any CPU + {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Release|Any CPU.Build.0 = Release|Any CPU + {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3B8ADCDE-F7B8-41BD-8415-B0C1DEF1BB93} = {2E4C38DE-0426-40A2-AB0B-507BF6F5B0A6} + {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {8CC0FE2E-297C-4427-8B66-B50E867823C3} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {B2E4B8B6-9F55-4C99-8968-43144BEB809B} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {194DF788-2210-444E-826B-C3A6C10F14F7} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {2066569A-C60A-42F6-B10A-C2F0D80143A3} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} + {832E60B1-0225-48B3-9AAD-638A0F5AA15E} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} + {0F173CC9-EA04-4243-A506-E2C59C905A5E} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} + {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} + {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} + {7FAB51DE-6ED6-4CCA-887C-DB8274237E92} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F15DC234-2EF5-47F9-BB66-3C651311A3E5} + EndGlobalSection +EndGlobal diff --git a/global.json b/global.json new file mode 100644 index 0000000..c0838a7 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.100", + "rollForward": "minor", + "allowPrerelease": true + } +} diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 8cb48b8..ce6b8b6 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,4 +1,4 @@ - + net8.0;net7.0;net6.0;netstandard2.0;net462 @@ -6,28 +6,36 @@ latest true $(NoWarn);CS1591 + Embedded + True + true 2.0.0 Wei Chen https://github.com/weichch/system-text-json-jsondiffpatch Copyright © Wei Chen 2024 + https://github.com/weichch/system-text-json-jsondiffpatch.git + git + Copyright © Wei Chen 2022 icon.png LICENSE https://github.com/weichch/system-text-json-jsondiffpatch/blob/$(JsonDiffPatchPackageVersion)/ReleaseNotes.md + true + true $(JsonDiffPatchPackageVersion) - 1.0.0.0 - 1.0.0.0 + $(JsonDiffPatchPackageVersion).0 + $(JsonDiffPatchPackageVersion).0 - + - + diff --git a/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj b/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj index 37525ba..d45059c 100644 --- a/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj +++ b/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj @@ -15,7 +15,11 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + diff --git a/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj b/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj index 0d35609..ca5a97f 100644 --- a/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj +++ b/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj @@ -15,7 +15,11 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + diff --git a/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj b/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj index 2f3bba2..d811277 100644 --- a/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj +++ b/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj @@ -15,7 +15,11 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - + diff --git a/src/SystemTextJson.JsonDiffPatch.sln b/src/SystemTextJson.JsonDiffPatch.sln deleted file mode 100644 index 0d39a41..0000000 --- a/src/SystemTextJson.JsonDiffPatch.sln +++ /dev/null @@ -1,82 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31829.152 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch", "SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj", "{2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AE524BA2-D5E2-4D5F-BC95-9AA064D46234}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.UnitTests", "..\test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj", "{832E60B1-0225-48B3-9AAD-638A0F5AA15E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.Benchmark", "..\test\SystemTextJson.JsonDiffPatch.Benchmark\SystemTextJson.JsonDiffPatch.Benchmark.csproj", "{0F173CC9-EA04-4243-A506-E2C59C905A5E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.Xunit", "SystemTextJson.JsonDiffPatch.Xunit\SystemTextJson.JsonDiffPatch.Xunit.csproj", "{8CC0FE2E-297C-4427-8B66-B50E867823C3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.MSTest", "SystemTextJson.JsonDiffPatch.MSTest\SystemTextJson.JsonDiffPatch.MSTest.csproj", "{B2E4B8B6-9F55-4C99-8968-43144BEB809B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.Xunit.Tests", "..\test\SystemTextJson.JsonDiffPatch.Xunit.Tests\SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj", "{5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.MSTest.Tests", "..\test\SystemTextJson.JsonDiffPatch.MSTest.Tests\SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj", "{B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.NUnit", "SystemTextJson.JsonDiffPatch.NUnit\SystemTextJson.JsonDiffPatch.NUnit.csproj", "{194DF788-2210-444E-826B-C3A6C10F14F7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.NUnit.Tests", "..\test\SystemTextJson.JsonDiffPatch.NUnit.Tests\SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj", "{7FAB51DE-6ED6-4CCA-887C-DB8274237E92}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Release|Any CPU.Build.0 = Release|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.Build.0 = Release|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.Build.0 = Release|Any CPU - {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Release|Any CPU.Build.0 = Release|Any CPU - {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Release|Any CPU.Build.0 = Release|Any CPU - {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Release|Any CPU.Build.0 = Release|Any CPU - {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Release|Any CPU.Build.0 = Release|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.Build.0 = Release|Any CPU - {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {832E60B1-0225-48B3-9AAD-638A0F5AA15E} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} - {0F173CC9-EA04-4243-A506-E2C59C905A5E} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} - {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} - {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} - {7FAB51DE-6ED6-4CCA-887C-DB8274237E92} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F15DC234-2EF5-47F9-BB66-3C651311A3E5} - EndGlobalSection -EndGlobal diff --git a/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj b/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj index a92ba95..e4c1253 100644 --- a/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj +++ b/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj @@ -15,12 +15,16 @@ - + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - + diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 6c40006..0cbaabe 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -8,6 +8,7 @@ false enable latest + true diff --git a/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj b/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj index c13337c..554ea98 100644 --- a/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj +++ b/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj @@ -3,6 +3,7 @@ Exe true + false diff --git a/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj index 644d848..c1c98e1 100644 --- a/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs index 797edd0..31cf1b0 100644 --- a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs +++ b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs @@ -10,8 +10,8 @@ public class JsonAssertTests [Test] public void AreEqual_String() { - var json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; - var json2 = "{\"baz\":\"qux\",\"foo\":\"bar\"}"; + const string json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; + const string json2 = "{\"baz\":\"qux\",\"foo\":\"bar\"}"; JsonAssert.AreEqual(json1, json2); } @@ -43,7 +43,7 @@ public void AreEqual_FailWithMessage() var error = Assert.Throws( () => JsonAssert.AreEqual(json1, json2)); - StringAssert.Contains("JsonAssert.AreEqual() failure.", error!.Message); + Assert.That(error!.Message, Does.Contain("JsonAssert.AreEqual() failure.")); } [Test] @@ -55,10 +55,13 @@ public void AreEqual_FailWithDefaultOutput() var error = Assert.Throws( () => JsonAssert.AreEqual(json1, json2, true)); - StringAssert.Contains("JsonAssert.AreEqual() failure.", error!.Message); - StringAssert.Contains("Expected:", error.Message); - StringAssert.Contains("Actual:", error.Message); - StringAssert.Contains("Delta:", error.Message); + Assert.Multiple(() => + { + Assert.That(error!.Message, Does.Contain("JsonAssert.AreEqual() failure.")); + Assert.That(error.Message, Does.Contain("Expected:")); + Assert.That(error.Message, Does.Contain("Actual:")); + Assert.That(error.Message, Does.Contain("Delta:")); + }); } [Test] @@ -70,15 +73,18 @@ public void AreEqual_FailWithCustomOutput() var error = Assert.Throws(() => JsonAssert.AreEqual(json1, json2, _ => "Custom message")); - StringAssert.Contains("JsonAssert.AreEqual() failure.", error!.Message); - StringAssert.Contains("Custom message", error.Message); + Assert.Multiple(() => + { + Assert.That(error!.Message, Does.Contain("JsonAssert.AreEqual() failure.")); + Assert.That(error.Message, Does.Contain("Custom message")); + }); } [Test] public void AreNotEqual_String() { - var json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; - var json2 = "{\"foo\":\"baz\"}"; + const string json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; + const string json2 = "{\"foo\":\"baz\"}"; JsonAssert.AreNotEqual(json1, json2); } @@ -100,8 +106,8 @@ public void AreNotEqual_Nulls() var error = Assert.Throws( () => JsonAssert.AreNotEqual(json1, json2)); - - Assert.IsNotNull(error); + + Assert.That(error, Is.Not.Null); } [Test] @@ -113,7 +119,7 @@ public void AreNotEqual_FailWithMessage() var error = Assert.Throws( () => JsonAssert.AreNotEqual(json1, json2)); - StringAssert.Contains("JsonAssert.AreNotEqual() failure.", error!.Message); + Assert.That(error!.Message, Does.Contain("JsonAssert.AreNotEqual() failure.")); } } } \ No newline at end of file diff --git a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj index 8e84012..0d40931 100644 --- a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj @@ -1,9 +1,9 @@ - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj b/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj index 729edcd..b6208f5 100644 --- a/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj @@ -1,8 +1,8 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj index 08aef5c..d00c1a1 100644 --- a/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj @@ -1,8 +1,8 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all