From 8a87e7fc270cae7576973108f9fe2378c65ec087 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 10 Aug 2024 19:06:05 +1000 Subject: [PATCH] Add xunit v3 support (#1263) --- docs/anonymous-types.md | 2 +- docs/compared-to-assertion.md | 22 +- docs/explicit-targets.md | 2 +- docs/naming.md | 6 +- docs/parameterised.md | 20 +- docs/scrubbers.md | 4 +- docs/verify-directory.md | 8 +- docs/verify-zip.md | 8 +- docs/wiz/Linux_Other_Cli_Xunit_AppVeyor.md | 2 +- docs/wiz/Linux_Other_Cli_Xunit_AzureDevOps.md | 2 +- .../Linux_Other_Cli_Xunit_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Cli_Xunit_None.md | 2 +- docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md | 2 +- .../Linux_Other_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_Xunit_None.md | 2 +- docs/wiz/Linux_Rider_Cli_Xunit_AppVeyor.md | 2 +- docs/wiz/Linux_Rider_Cli_Xunit_AzureDevOps.md | 2 +- .../Linux_Rider_Cli_Xunit_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Cli_Xunit_None.md | 2 +- docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_Xunit_None.md | 2 +- docs/wiz/MacOS_Other_Cli_Xunit_AppVeyor.md | 2 +- docs/wiz/MacOS_Other_Cli_Xunit_AzureDevOps.md | 2 +- .../MacOS_Other_Cli_Xunit_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Cli_Xunit_None.md | 2 +- docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_Xunit_None.md | 2 +- docs/wiz/MacOS_Rider_Cli_Xunit_AppVeyor.md | 2 +- docs/wiz/MacOS_Rider_Cli_Xunit_AzureDevOps.md | 2 +- .../MacOS_Rider_Cli_Xunit_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Cli_Xunit_None.md | 2 +- docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_Xunit_None.md | 2 +- docs/wiz/Windows_Other_Cli_Xunit_AppVeyor.md | 2 +- .../Windows_Other_Cli_Xunit_AzureDevOps.md | 2 +- .../Windows_Other_Cli_Xunit_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Cli_Xunit_None.md | 2 +- docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md | 2 +- .../Windows_Other_Gui_Xunit_AzureDevOps.md | 2 +- .../Windows_Other_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_Xunit_None.md | 2 +- docs/wiz/Windows_Rider_Cli_Xunit_AppVeyor.md | 2 +- .../Windows_Rider_Cli_Xunit_AzureDevOps.md | 2 +- .../Windows_Rider_Cli_Xunit_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Cli_Xunit_None.md | 2 +- docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md | 2 +- .../Windows_Rider_Gui_Xunit_AzureDevOps.md | 2 +- .../Windows_Rider_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_Xunit_None.md | 2 +- ...lStudioWithReSharper_Cli_Xunit_AppVeyor.md | 2 +- ...udioWithReSharper_Cli_Xunit_AzureDevOps.md | 2 +- ...ioWithReSharper_Cli_Xunit_GitHubActions.md | 2 +- ...isualStudioWithReSharper_Cli_Xunit_None.md | 2 +- ...lStudioWithReSharper_Gui_Xunit_AppVeyor.md | 2 +- ...udioWithReSharper_Gui_Xunit_AzureDevOps.md | 2 +- ...ioWithReSharper_Gui_Xunit_GitHubActions.md | 2 +- ...isualStudioWithReSharper_Gui_Xunit_None.md | 2 +- ...Windows_VisualStudio_Cli_Xunit_AppVeyor.md | 2 +- ...dows_VisualStudio_Cli_Xunit_AzureDevOps.md | 2 +- ...ws_VisualStudio_Cli_Xunit_GitHubActions.md | 2 +- .../Windows_VisualStudio_Cli_Xunit_None.md | 2 +- ...Windows_VisualStudio_Gui_Xunit_AppVeyor.md | 2 +- ...dows_VisualStudio_Gui_Xunit_AzureDevOps.md | 2 +- ...ws_VisualStudio_Gui_Xunit_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_Xunit_None.md | 2 +- readme.md | 2 +- src/Directory.Packages.props | 6 +- .../Scrubbers/ScrubberLevelsSample.cs | 8 +- .../Scrubbers/ScrubbersSample.cs | 8 +- .../Snippets/CompareToAssert.cs | 8 - .../Snippets/ComplexParametersSample.cs | 8 +- .../Snippets/ExtensionSample.cs | 8 +- .../Snippets/ParametersHashSample.cs | 8 +- .../Snippets/ParametersSample.cs | 31 --- src/Verify.Xunit.Tests/Snippets/Sample.cs | 8 +- .../Snippets/UniqueForSample.cs | 8 +- src/Verify.Xunit.Tests/Tests.cs | 45 +--- src/Verify.Xunit.Tests/VerifyObjectSamples.cs | 4 - ...stomTypeName.CustomMethodName.verified.txt | 1 + ...ests.ProjectRelativeDirectory.verified.txt | 1 + ...s.SourceFileRelativeDirectory.verified.txt | 1 + .../Tests.ReturnNulls.verified.txt | 1 + .../Tests.ThrowOnConflict.verified.txt | 0 src/Verify.XunitV3.DerivePaths.Tests/Tests.cs | 70 +++++++ .../Verify.XunitV3.DerivePaths.Tests.csproj | 16 ++ .../Inheritance/Base.TestInBase.verified.txt | 1 + .../Base.TestToOverride.verified.txt | 1 + src/Verify.XunitV3.Tests/Inheritance/Base.cs | 10 + .../Inherited.TestInBase.verified.txt | 1 + .../Inherited.TestToOverride.verified.txt | 1 + .../Inheritance/Inherited.cs | 8 + ...edTypeTests.Nested.ShouldPass.verified.txt | 1 + .../NestedTypeTests.ShouldPass.verified.txt | 1 + src/Verify.XunitV3.Tests/NestedTypeTests.cs | 13 ++ ...crubberLevelsSample.AfterJson.verified.txt | 0 .../ScrubberLevelsSample.Usage.verified.txt | 1 + ...ubberLevelsSample.UsageFluent.verified.txt | 1 + .../Scrubbers/ScrubberLevelsSample.cs | 31 +++ ...bersSample.AfterSerialization.verified.txt | 3 + ...mple.AfterSerializationFluent.verified.txt | 3 + .../ScrubbersSample.EmptyLine.verified.txt | 1 + .../ScrubbersSample.EmptyLines.verified.txt | 2 + .../ScrubbersSample.Lines.verified.txt | 4 + .../ScrubbersSample.LinesFluent.verified.txt | 4 + ...rubbersSample.RemoveOrReplace.verified.txt | 2 + .../Scrubbers/ScrubbersSample.cs | 129 ++++++++++++ .../CompareToAssert.SnapshotTest.verified.txt | 14 ++ .../Snippets/CompareToAssert.cs | 33 +++ ...etersSample.ComplexMemberData.verified.txt | 0 ...xParametersSample+ComplexData.verified.txt | 0 ...exMemberDataFluent_arg=Value1.verified.txt | 3 + ...exMemberDataFluent_arg=Value2.verified.txt | 3 + ...xParametersSample+ComplexData.verified.txt | 0 ....ComplexMemberData_arg=Value1.verified.txt | 3 + ....ComplexMemberData_arg=Value2.verified.txt | 3 + ...NullableDataFluent_arg=Value1.verified.txt | 3 + ...NullableDataFluent_arg=Value2.verified.txt | 3 + ...MemberNullableData_arg=Value1.verified.txt | 3 + ...MemberNullableData_arg=Value2.verified.txt | 3 + ...etersSample+ComplexStructData.verified.txt | 0 ...leStructDataFluent_arg=Value1.verified.txt | 3 + ...leStructDataFluent_arg=Value2.verified.txt | 3 + ...etersSample+ComplexStructData.verified.txt | 0 ...NullableStructData_arg=Value1.verified.txt | 3 + ...NullableStructData_arg=Value2.verified.txt | 3 + ...etersSample+ComplexStructData.verified.txt | 0 ...erStructDataFluent_arg=Value1.verified.txt | 3 + ...erStructDataFluent_arg=Value2.verified.txt | 3 + ...etersSample+ComplexStructData.verified.txt | 0 ...exMemberStructData_arg=Value1.verified.txt | 3 + ...exMemberStructData_arg=Value2.verified.txt | 3 + .../Snippets/ComplexParametersSample.cs | 95 +++++++++ .../ExtensionSample.AtMethod.verified.xml | 5 + ...xtensionSample.AtMethodFluent.verified.xml | 5 + .../Snippets/ExtensionSample.cs | 30 +++ ...sUsageFluent_25a91d2c54f27235.verified.txt | 1 + ...sUsageFluent_80cceeb56ef4cffc.verified.txt | 1 + ...ametersUsage_25a91d2c54f27235.verified.txt | 1 + ...ametersUsage_80cceeb56ef4cffc.verified.txt | 1 + ...sUsageFluent_25a91d2c54f27235.verified.txt | 1 + ...sUsageFluent_80cceeb56ef4cffc.verified.txt | 1 + ...ametersUsage_25a91d2c54f27235.verified.txt | 1 + ...ametersUsage_80cceeb56ef4cffc.verified.txt | 1 + .../Snippets/ParametersHashSample.cs | 42 ++++ ...ametersSample.Decimal_arg=1.1.verified.txt | 1 + ...rametersSample.Double_arg=1.1.verified.txt | 1 + ...arametersSample.Float_arg=1.1.verified.txt | 1 + ...e.IgnoreParametersForVerified.verified.txt | 1 + ...metersForVerifiedCustomParams.verified.txt | 1 + ...ForVerifiedCustomParamsFluent.verified.txt | 1 + ...reParametersForVerifiedFluent.verified.txt | 1 + ...ineDataUsageFluent_arg=Value1.verified.txt | 1 + ...ineDataUsageFluent_arg=Value2.verified.txt | 1 + ...le.InlineDataUsage_arg=Value1.verified.txt | 1 + ...e.InlineDataUsage_arg=Value10.verified.txt | 0 ...le.InlineDataUsage_arg=Value2.verified.txt | 1 + ...le.InlineDataUsage_arg=Value3.verified.txt | 0 ...le.InlineDataUsage_arg=Value5.verified.txt | 0 ...le.InlineDataUsage_arg=Value9.verified.txt | 0 ...berDataUsageFluent_arg=Value1.verified.txt | 1 + ...berDataUsageFluent_arg=Value2.verified.txt | 1 + ...le.MemberDataUsage_arg=Value1.verified.txt | 1 + ...le.MemberDataUsage_arg=Value2.verified.txt | 1 + ...ubSet_arg1=Value1_arg2=Value2.verified.txt | 1 + ...UseParametersUsage_arg=Value1.verified.txt | 1 + ...UseParametersUsage_arg=Value2.verified.txt | 1 + .../Snippets/ParametersSample.cs | 174 ++++++++++++++++ .../Snippets/Sample.Test.verified.txt | 14 ++ src/Verify.XunitV3.Tests/Snippets/Sample.cs | 13 ++ ...queForSample.Architecture.x64.verified.txt | 1 + ...Sample.ArchitectureFluent.x64.verified.txt | 1 + ...e.AssemblyConfiguration.Debug.verified.txt | 1 + ...AssemblyConfiguration.Release.verified.txt | 1 + ...mblyConfigurationFluent.Debug.verified.txt | 1 + ...lyConfigurationFluent.Release.verified.txt | 1 + ...queForSample.OSPlatform.Linux.verified.txt | 1 + ...niqueForSample.OSPlatform.OSX.verified.txt | 1 + ...eForSample.OSPlatform.Windows.verified.txt | 1 + ...Sample.OSPlatformFluent.Linux.verified.txt | 1 + ...orSample.OSPlatformFluent.OSX.verified.txt | 1 + ...mple.OSPlatformFluent.Windows.verified.txt | 1 + ...niqueForSample.Runtime.DotNet.verified.txt | 1 + .../UniqueForSample.Runtime.Net.verified.txt | 1 + ...e.RuntimeAndVersion.DotNet7_0.verified.txt | 1 + ...e.RuntimeAndVersion.DotNet8_0.verified.txt | 1 + ...e.RuntimeAndVersion.DotNet9_0.verified.txt | 1 + ...mple.RuntimeAndVersion.Net4_8.verified.txt | 1 + ...orSample.RuntimeFluent.DotNet.verified.txt | 1 + ...ueForSample.RuntimeFluent.Net.verified.txt | 1 + .../Snippets/UniqueForSample.cs | 66 ++++++ ....EnumerableTargets#targetName.verified.txt | 1 + .../Tests.MissingParameter.verified.txt | 1 + .../Tests.StringTarget.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + .../toConvert.verified.VerifyDirectoryTests | 1 + .../.verified.TextDocStartingWithDot | 1 + .../TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + .../target.verified.txt | 1 + .../toConvert.verified.VerifyDirectoryTests | 1 + .../.verified.TextDocStartingWithDot | 1 + .../TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + .../toConvert.verified.VerifyDirectoryTests | 1 + .../.verified.TextDocStartingWithDot | 1 + .../TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + .../target.verified.txt | 1 + .../toConvert.verified.VerifyDirectoryTests | 1 + .../.verified.TextDocStartingWithDot | 1 + .../Tests.WithDirectory/TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + .../toConvert.verified.VerifyDirectoryTests | 1 + .../TextDoc.verified.txt | 1 + .../Tests.WithTargets#targetName.verified.txt | 1 + .../Tests.WithTargets.verified.txt | 3 + ...ts.WithTargetsAndConverter#00.verified.txt | 3 + ...ts.WithTargetsAndConverter#01.verified.txt | 1 + ...ts.WithTargetsAndConverter#02.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../Tests.WithZip/TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + .../toConvert.verified.VerifyDirectoryTests | 1 + .../.verified.TextDocStartingWithDot | 1 + .../TextDoc.verified.txt | 1 + .../.verified.TextDocStartingWithDot | 1 + .../nested.with.dot/TextDoc2.verified.txt | 1 + ...xtDocWithoutExtension.verified.noextension | 1 + .../nested/TextDoc2.verified.txt | 1 + src/Verify.XunitV3.Tests/Tests.cs | 195 ++++++++++++++++++ .../UseFileNameWithParam.verified.txt | 1 + .../Verify.XunitV3.Tests.csproj | 33 +++ .../VerifyObjectSamples.Anon.verified.txt | 10 + ...bjectSamples.ScopedSerializer.verified.txt | 5 + .../VerifyObjectSamples.cs | 64 ++++++ .../VerifyTextSample.Simple.verified.txt | 1 + src/Verify.XunitV3.Tests/VerifyTextSample.cs | 6 + .../DerivePaths/DerivePathInfo.cs | 10 + src/Verify.XunitV3/DerivePaths/Verifier.cs | 43 ++++ src/Verify.XunitV3/GlobalUsings.cs | 5 + src/Verify.XunitV3/InternalsVisibleTo.cs | 1 + src/Verify.XunitV3/Verifier.cs | 86 ++++++++ src/Verify.XunitV3/Verifier_Archive.cs | 45 ++++ src/Verify.XunitV3/Verifier_Directory.cs | 75 +++++++ src/Verify.XunitV3/Verifier_File.cs | 29 +++ src/Verify.XunitV3/Verifier_Json.cs | 49 +++++ src/Verify.XunitV3/Verifier_Object.cs | 45 ++++ src/Verify.XunitV3/Verifier_Stream.cs | 94 +++++++++ src/Verify.XunitV3/Verifier_String.cs | 34 +++ src/Verify.XunitV3/Verifier_Throws.cs | 46 +++++ src/Verify.XunitV3/Verifier_Tuple.cs | 11 + src/Verify.XunitV3/Verifier_Xml.cs | 49 +++++ src/Verify.XunitV3/Verify.XunitV3.csproj | 23 +++ src/Verify.XunitV3/VerifyBase.cs | 31 +++ src/Verify.XunitV3/VerifyBase_Archive.cs | 60 ++++++ src/Verify.XunitV3/VerifyBase_Directory.cs | 99 +++++++++ src/Verify.XunitV3/VerifyBase_File.cs | 25 +++ src/Verify.XunitV3/VerifyBase_Json.cs | 43 ++++ src/Verify.XunitV3/VerifyBase_Object.cs | 38 ++++ src/Verify.XunitV3/VerifyBase_Stream.cs | 84 ++++++++ src/Verify.XunitV3/VerifyBase_String.cs | 30 +++ src/Verify.XunitV3/VerifyBase_Throws.cs | 28 +++ src/Verify.XunitV3/VerifyBase_Tuple.cs | 10 + src/Verify.XunitV3/VerifyBase_Xml.cs | 43 ++++ .../buildTransitive/Verify.XunitV3.props | 8 + src/Verify.sln | 12 ++ src/Verify/InternalsVisibleTo.cs | 2 + src/VerifyXunitV3.slnf | 10 + src/appveyor.yml | 2 + 296 files changed, 2572 insertions(+), 221 deletions(-) create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/CustomDir/CustomTypeName.CustomMethodName.verified.txt create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.ProjectRelativeDirectory.verified.txt create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.SourceFileRelativeDirectory.verified.txt create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/Tests.ReturnNulls.verified.txt create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/Tests.ThrowOnConflict.verified.txt create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/Tests.cs create mode 100644 src/Verify.XunitV3.DerivePaths.Tests/Verify.XunitV3.DerivePaths.Tests.csproj create mode 100644 src/Verify.XunitV3.Tests/Inheritance/Base.TestInBase.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Inheritance/Base.TestToOverride.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Inheritance/Base.cs create mode 100644 src/Verify.XunitV3.Tests/Inheritance/Inherited.TestInBase.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Inheritance/Inherited.TestToOverride.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Inheritance/Inherited.cs create mode 100644 src/Verify.XunitV3.Tests/NestedTypeTests.Nested.ShouldPass.verified.txt create mode 100644 src/Verify.XunitV3.Tests/NestedTypeTests.ShouldPass.verified.txt create mode 100644 src/Verify.XunitV3.Tests/NestedTypeTests.cs create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.AfterJson.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.Usage.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.UsageFluent.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.cs create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerialization.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerializationFluent.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLine.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLines.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.Lines.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.LinesFluent.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.RemoveOrReplace.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/CompareToAssert.SnapshotTest.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/CompareToAssert.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=ComplexParametersSample+ComplexData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=ComplexParametersSample+ComplexData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=ComplexParametersSample+ComplexStructData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=ComplexParametersSample+ComplexStructData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=ComplexParametersSample+ComplexStructData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=ComplexParametersSample+ComplexStructData.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethod.verified.xml create mode 100644 src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethodFluent.verified.xml create mode 100644 src/Verify.XunitV3.Tests/Snippets/ExtensionSample.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_25a91d2c54f27235.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_80cceeb56ef4cffc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_25a91d2c54f27235.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_80cceeb56ef4cffc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_25a91d2c54f27235.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_80cceeb56ef4cffc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_25a91d2c54f27235.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_80cceeb56ef4cffc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.Decimal_arg=1.1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.Double_arg=1.1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.Float_arg=1.1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerified.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParams.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParamsFluent.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedFluent.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value10.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value3.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value5.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value9.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersSubSet_arg1=Value1_arg2=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value1.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/ParametersSample.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/Sample.Test.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/Sample.cs create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Architecture.x64.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.ArchitectureFluent.x64.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Debug.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Release.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Debug.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Release.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Linux.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.OSX.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Windows.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Linux.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.OSX.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Windows.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.DotNet.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.Net.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet7_0.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet8_0.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet9_0.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.Net4_8.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.DotNet.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.Net.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Snippets/UniqueForSample.cs create mode 100644 src/Verify.XunitV3.Tests/Tests.EnumerableTargets#targetName.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.MissingParameter.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.StringTarget.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/toConvert.verified.VerifyDirectoryTests create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/target.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/toConvert.verified.VerifyDirectoryTests create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/toConvert.verified.VerifyDirectoryTests create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/target.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/toConvert.verified.VerifyDirectoryTests create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectory/toConvert.verified.VerifyDirectoryTests create mode 100644 src/Verify.XunitV3.Tests/Tests.WithDirectoryFiltered/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithTargets#targetName.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithTargets.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#00.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#01.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#02.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZip/toConvert.verified.VerifyDirectoryTests create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZipFiltered/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZipFiltered/TextDoc.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/.verified.TextDocStartingWithDot create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDocWithoutExtension.verified.noextension create mode 100644 src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested/TextDoc2.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Tests.cs create mode 100644 src/Verify.XunitV3.Tests/UseFileNameWithParam.verified.txt create mode 100644 src/Verify.XunitV3.Tests/Verify.XunitV3.Tests.csproj create mode 100644 src/Verify.XunitV3.Tests/VerifyObjectSamples.Anon.verified.txt create mode 100644 src/Verify.XunitV3.Tests/VerifyObjectSamples.ScopedSerializer.verified.txt create mode 100644 src/Verify.XunitV3.Tests/VerifyObjectSamples.cs create mode 100644 src/Verify.XunitV3.Tests/VerifyTextSample.Simple.verified.txt create mode 100644 src/Verify.XunitV3.Tests/VerifyTextSample.cs create mode 100644 src/Verify.XunitV3/DerivePaths/DerivePathInfo.cs create mode 100644 src/Verify.XunitV3/DerivePaths/Verifier.cs create mode 100644 src/Verify.XunitV3/GlobalUsings.cs create mode 100644 src/Verify.XunitV3/InternalsVisibleTo.cs create mode 100644 src/Verify.XunitV3/Verifier.cs create mode 100644 src/Verify.XunitV3/Verifier_Archive.cs create mode 100644 src/Verify.XunitV3/Verifier_Directory.cs create mode 100644 src/Verify.XunitV3/Verifier_File.cs create mode 100644 src/Verify.XunitV3/Verifier_Json.cs create mode 100644 src/Verify.XunitV3/Verifier_Object.cs create mode 100644 src/Verify.XunitV3/Verifier_Stream.cs create mode 100644 src/Verify.XunitV3/Verifier_String.cs create mode 100644 src/Verify.XunitV3/Verifier_Throws.cs create mode 100644 src/Verify.XunitV3/Verifier_Tuple.cs create mode 100644 src/Verify.XunitV3/Verifier_Xml.cs create mode 100644 src/Verify.XunitV3/Verify.XunitV3.csproj create mode 100644 src/Verify.XunitV3/VerifyBase.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Archive.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Directory.cs create mode 100644 src/Verify.XunitV3/VerifyBase_File.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Json.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Object.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Stream.cs create mode 100644 src/Verify.XunitV3/VerifyBase_String.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Throws.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Tuple.cs create mode 100644 src/Verify.XunitV3/VerifyBase_Xml.cs create mode 100644 src/Verify.XunitV3/buildTransitive/Verify.XunitV3.props create mode 100644 src/VerifyXunitV3.slnf diff --git a/docs/anonymous-types.md b/docs/anonymous-types.md index e22572c894..1bf4f2925c 100644 --- a/docs/anonymous-types.md +++ b/docs/anonymous-types.md @@ -68,7 +68,7 @@ public Task Anon() }); } ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/compared-to-assertion.md b/docs/compared-to-assertion.md index f4223fbff8..22e36f73af 100644 --- a/docs/compared-to-assertion.md +++ b/docs/compared-to-assertion.md @@ -81,7 +81,7 @@ public void TraditionalTest() Assert.Equal("USA", person.Address.Country); } ``` -snippet source | anchor +snippet source | anchor @@ -97,7 +97,7 @@ public Task SnapshotTest() return Verify(person); } ``` -snippet source | anchor +snippet source | anchor Produces a snapshot file `SnapshotTest.verified.txt`: @@ -121,4 +121,22 @@ Produces a snapshot file `SnapshotTest.verified.txt`: } ``` snippet source | anchor + +```txt +{ + GivenNames: John, + FamilyName: Smith, + Spouse: Jill, + Address: { + Street: 4 Puddle Lane, + Country: USA + }, + Children: [ + Sam, + Mary + ], + Id: Guid_1 +} +``` +snippet source | anchor diff --git a/docs/explicit-targets.md b/docs/explicit-targets.md index 45c83644a9..2c97718524 100644 --- a/docs/explicit-targets.md +++ b/docs/explicit-targets.md @@ -54,7 +54,7 @@ public Task WithTargets() => name: "targetName") ]); ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/naming.md b/docs/naming.md index 1ecac4977f..cde5931892 100644 --- a/docs/naming.md +++ b/docs/naming.md @@ -307,7 +307,7 @@ public class UniqueForSample .UniqueForOSPlatform(); } ``` -snippet source | anchor +snippet source | anchor @@ -534,7 +534,7 @@ public class ExtensionSample extension: "xml"); } ``` -snippet source | anchor +snippet source | anchor Result in: @@ -593,7 +593,7 @@ Verifier.DerivePathInfo( typeName: type.Name, methodName: method.Name)); ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/parameterised.md b/docs/parameterised.md index d5367558ce..4023ff8ff1 100644 --- a/docs/parameterised.md +++ b/docs/parameterised.md @@ -44,7 +44,7 @@ public Task UseParametersUsage(string arg) .UseParameters(arg); } ``` -snippet source | anchor +snippet source | anchor If not all parameters are required, a subset can be passed in. In this scenario, the parameters passed in will match with the method parameter names from the start. For example the following will result in a file named `ParametersSample.UseParametersSubSet_arg1=Value1_arg2=Value2.verified.txt` @@ -61,7 +61,7 @@ public Task UseParametersSubSet(string arg1, string arg2, string arg3) .UseParameters(arg1, arg2); } ``` -snippet source | anchor +snippet source | anchor If the number of parameters passed to `UseParameters()` is greater than the number of parameters in the test method, an exception will be thrown. @@ -152,7 +152,7 @@ public Task InlineDataUsageFluent(string arg) => Verify(arg) .UseParameters(arg); ``` -snippet source | anchor +snippet source | anchor @@ -188,7 +188,7 @@ public static IEnumerable GetData() ]; } ``` -snippet source | anchor +snippet source | anchor @@ -291,7 +291,7 @@ public class ComplexParametersSample public record ComplexStructData(string Value); } ``` -snippet source | anchor +snippet source | anchor `VerifierSettings.NameForParameter()` is required since the parameter type has no `ToString()` override that can be used for deriving the name of the `.verified.` file. @@ -475,7 +475,7 @@ public Task IgnoreParametersForVerified(string arg) return Verify("value", settings); } ``` -snippet source | anchor +snippet source | anchor @@ -491,7 +491,7 @@ public Task IgnoreParametersForVerifiedFluent(string arg) => Verify("value") .IgnoreParametersForVerified(arg); ``` -snippet source | anchor +snippet source | anchor @@ -592,7 +592,7 @@ public Task IgnoreParametersForVerifiedCustomParams(string arg) return Verify("value", settings); } ``` -snippet source | anchor +snippet source | anchor @@ -608,7 +608,7 @@ public Task IgnoreParametersForVerifiedCustomParamsFluent(string arg) => Verify("value") .IgnoreParametersForVerified($"Number{arg}"); ``` -snippet source | anchor +snippet source | anchor @@ -851,7 +851,7 @@ public class ParametersHashSample .HashParameters(); } ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/scrubbers.md b/docs/scrubbers.md index e09e36c959..e329f4c66e 100644 --- a/docs/scrubbers.md +++ b/docs/scrubbers.md @@ -394,7 +394,7 @@ public class ScrubbersSample .ScrubEmptyLines(); } ``` -snippet source | anchor +snippet source | anchor @@ -743,7 +743,7 @@ public class ScrubberLevelsSample VerifierSettings.AddScrubber(_ => _.Replace("One", "A")); } ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/verify-directory.md b/docs/verify-directory.md index 06856f5281..c9a6c155fc 100644 --- a/docs/verify-directory.md +++ b/docs/verify-directory.md @@ -16,7 +16,7 @@ Verifies all files in a directory. This approach combines [UseUniqueDirectory](/ public Task WithDirectory() => VerifyDirectory(directoryToVerify); ``` -snippet source | anchor +snippet source | anchor @@ -36,7 +36,7 @@ public Task WithDirectoryFiltered() => RecurseSubdirectories = false }); ``` -snippet source | anchor +snippet source | anchor @@ -53,7 +53,7 @@ public Task VerifyDirectoryWithInfo() => directoryToVerify, info: "the info"); ``` -snippet source | anchor +snippet source | anchor @@ -77,7 +77,7 @@ public Task VerifyDirectoryWithFileScrubber() => } }); ``` -snippet source | anchor +snippet source | anchor This applies to files where the extensins is a known text file as defined by [FileExtensions.IsText](https://github.com/VerifyTests/EmptyFiles#istext). diff --git a/docs/verify-zip.md b/docs/verify-zip.md index 7dd0a8eea1..10a56d5527 100644 --- a/docs/verify-zip.md +++ b/docs/verify-zip.md @@ -16,7 +16,7 @@ Verifies all files in a zip archive. This approach combines [UseUniqueDirectory] public Task WithZip() => VerifyZip(zipPath); ``` -snippet source | anchor +snippet source | anchor @@ -31,7 +31,7 @@ public Task WithZipFiltered() => zipPath, include: filePath => filePath.FullName.Contains("Doc")); ``` -snippet source | anchor +snippet source | anchor @@ -48,7 +48,7 @@ public Task VerifyZipWithInfo() => zipPath, info: "the info"); ``` -snippet source | anchor +snippet source | anchor @@ -72,7 +72,7 @@ public Task VerifyZipWithFileScrubber() => } }); ``` -snippet source | anchor +snippet source | anchor This applies to files where the extensins is a known text file as defined by [FileExtensions.IsText](https://github.com/VerifyTests/EmptyFiles#istext). diff --git a/docs/wiz/Linux_Other_Cli_Xunit_AppVeyor.md b/docs/wiz/Linux_Other_Cli_Xunit_AppVeyor.md index 3f0d859d78..fb4c3b3259 100644 --- a/docs/wiz/Linux_Other_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/Linux_Other_Cli_Xunit_AppVeyor.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Cli_Xunit_AzureDevOps.md b/docs/wiz/Linux_Other_Cli_Xunit_AzureDevOps.md index edfa9daece..673ebe5090 100644 --- a/docs/wiz/Linux_Other_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Cli_Xunit_AzureDevOps.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Cli_Xunit_GitHubActions.md b/docs/wiz/Linux_Other_Cli_Xunit_GitHubActions.md index 5ae0b65750..5af89b2ea4 100644 --- a/docs/wiz/Linux_Other_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/Linux_Other_Cli_Xunit_GitHubActions.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Cli_Xunit_None.md b/docs/wiz/Linux_Other_Cli_Xunit_None.md index 3153106ad0..9fc7a8fa64 100644 --- a/docs/wiz/Linux_Other_Cli_Xunit_None.md +++ b/docs/wiz/Linux_Other_Cli_Xunit_None.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md b/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md index adbaeb990e..a897c31c71 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md index 072c287863..93f14b18a0 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md b/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md index c00945f3a5..28f95afebf 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Other_Gui_Xunit_None.md b/docs/wiz/Linux_Other_Gui_Xunit_None.md index 715c9241ed..e552749380 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_None.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_None.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Cli_Xunit_AppVeyor.md b/docs/wiz/Linux_Rider_Cli_Xunit_AppVeyor.md index b504258512..8a1db15345 100644 --- a/docs/wiz/Linux_Rider_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Cli_Xunit_AppVeyor.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Cli_Xunit_AzureDevOps.md b/docs/wiz/Linux_Rider_Cli_Xunit_AzureDevOps.md index 5b8f4e0397..a8b8c985e2 100644 --- a/docs/wiz/Linux_Rider_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Cli_Xunit_AzureDevOps.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Cli_Xunit_GitHubActions.md b/docs/wiz/Linux_Rider_Cli_Xunit_GitHubActions.md index 717b54d39d..75a65ae43b 100644 --- a/docs/wiz/Linux_Rider_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Cli_Xunit_GitHubActions.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Cli_Xunit_None.md b/docs/wiz/Linux_Rider_Cli_Xunit_None.md index e6a9f45097..8b8beb6df9 100644 --- a/docs/wiz/Linux_Rider_Cli_Xunit_None.md +++ b/docs/wiz/Linux_Rider_Cli_Xunit_None.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md index 468c369efd..50654a88d1 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md index 4cef4b7ca0..c0e096aeea 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md index 27e325d2f1..a3b88f56dd 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_None.md b/docs/wiz/Linux_Rider_Gui_Xunit_None.md index 740e5718c7..9ad9925a53 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_None.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_None.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Cli_Xunit_AppVeyor.md b/docs/wiz/MacOS_Other_Cli_Xunit_AppVeyor.md index ef1529ad3f..88d8431940 100644 --- a/docs/wiz/MacOS_Other_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Cli_Xunit_AppVeyor.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Cli_Xunit_AzureDevOps.md b/docs/wiz/MacOS_Other_Cli_Xunit_AzureDevOps.md index 7b1b13c3d0..1b6aea09ec 100644 --- a/docs/wiz/MacOS_Other_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Cli_Xunit_AzureDevOps.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Cli_Xunit_GitHubActions.md b/docs/wiz/MacOS_Other_Cli_Xunit_GitHubActions.md index 0fc203cd4e..d1898fd5c5 100644 --- a/docs/wiz/MacOS_Other_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Cli_Xunit_GitHubActions.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Cli_Xunit_None.md b/docs/wiz/MacOS_Other_Cli_Xunit_None.md index 917e9acc6d..f81e4d3d18 100644 --- a/docs/wiz/MacOS_Other_Cli_Xunit_None.md +++ b/docs/wiz/MacOS_Other_Cli_Xunit_None.md @@ -146,7 +146,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md index 332a3c316e..8e8b98dc4b 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md index e928c9a771..c41876f6cd 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md index 94ad448ae5..9d02cd0971 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_None.md b/docs/wiz/MacOS_Other_Gui_Xunit_None.md index d545dad4f4..449e4c7ba2 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_None.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_None.md @@ -140,7 +140,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Cli_Xunit_AppVeyor.md b/docs/wiz/MacOS_Rider_Cli_Xunit_AppVeyor.md index 9127c9fb5a..270741b50c 100644 --- a/docs/wiz/MacOS_Rider_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Cli_Xunit_AppVeyor.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Cli_Xunit_AzureDevOps.md b/docs/wiz/MacOS_Rider_Cli_Xunit_AzureDevOps.md index 4d8bb9213c..c661f1b225 100644 --- a/docs/wiz/MacOS_Rider_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Cli_Xunit_AzureDevOps.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Cli_Xunit_GitHubActions.md b/docs/wiz/MacOS_Rider_Cli_Xunit_GitHubActions.md index e777cda69e..b8db4ed650 100644 --- a/docs/wiz/MacOS_Rider_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Cli_Xunit_GitHubActions.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Cli_Xunit_None.md b/docs/wiz/MacOS_Rider_Cli_Xunit_None.md index 970c4ffbd4..82e1abb06d 100644 --- a/docs/wiz/MacOS_Rider_Cli_Xunit_None.md +++ b/docs/wiz/MacOS_Rider_Cli_Xunit_None.md @@ -195,7 +195,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md index 55ee5baaa8..6cd205ec4c 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md index 0d35c666d1..fba828845c 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md index 3e8c90f884..bd58df7020 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_None.md b/docs/wiz/MacOS_Rider_Gui_Xunit_None.md index 43db5f93ef..f7bf8b673c 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_None.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_None.md @@ -189,7 +189,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Cli_Xunit_AppVeyor.md b/docs/wiz/Windows_Other_Cli_Xunit_AppVeyor.md index 1c5a5bc88a..c993127480 100644 --- a/docs/wiz/Windows_Other_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_Other_Cli_Xunit_AppVeyor.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Cli_Xunit_AzureDevOps.md b/docs/wiz/Windows_Other_Cli_Xunit_AzureDevOps.md index 02f7e3f57f..daf0d85489 100644 --- a/docs/wiz/Windows_Other_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Cli_Xunit_AzureDevOps.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Cli_Xunit_GitHubActions.md b/docs/wiz/Windows_Other_Cli_Xunit_GitHubActions.md index 182c06583b..eb4a4c9574 100644 --- a/docs/wiz/Windows_Other_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_Other_Cli_Xunit_GitHubActions.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Cli_Xunit_None.md b/docs/wiz/Windows_Other_Cli_Xunit_None.md index ec615c71ba..5616a13b2a 100644 --- a/docs/wiz/Windows_Other_Cli_Xunit_None.md +++ b/docs/wiz/Windows_Other_Cli_Xunit_None.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md index 86d3c4dc5e..2dcb813dca 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md index 9b0ab37cd1..49ddcff253 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md index 00e0a42801..8ceeb4faaf 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Other_Gui_Xunit_None.md b/docs/wiz/Windows_Other_Gui_Xunit_None.md index 7d237d3da7..b86795a16f 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_None.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_None.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Cli_Xunit_AppVeyor.md b/docs/wiz/Windows_Rider_Cli_Xunit_AppVeyor.md index 424eb9a57b..b49bf49b3a 100644 --- a/docs/wiz/Windows_Rider_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Cli_Xunit_AppVeyor.md @@ -208,7 +208,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Cli_Xunit_AzureDevOps.md b/docs/wiz/Windows_Rider_Cli_Xunit_AzureDevOps.md index e3224821ec..900259f7fe 100644 --- a/docs/wiz/Windows_Rider_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Cli_Xunit_AzureDevOps.md @@ -208,7 +208,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Cli_Xunit_GitHubActions.md b/docs/wiz/Windows_Rider_Cli_Xunit_GitHubActions.md index 8b75972592..b0593bb89b 100644 --- a/docs/wiz/Windows_Rider_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Cli_Xunit_GitHubActions.md @@ -208,7 +208,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Cli_Xunit_None.md b/docs/wiz/Windows_Rider_Cli_Xunit_None.md index b06db8deff..2a5dc24f98 100644 --- a/docs/wiz/Windows_Rider_Cli_Xunit_None.md +++ b/docs/wiz/Windows_Rider_Cli_Xunit_None.md @@ -208,7 +208,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md index 1515aa607d..5cb5fa6c60 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md @@ -202,7 +202,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md index 1ae6d86afe..faca2d1f40 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md @@ -202,7 +202,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md index 7bd9506515..df636c48b6 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md @@ -202,7 +202,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_None.md b/docs/wiz/Windows_Rider_Gui_Xunit_None.md index 10256c7e87..29d05fce34 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_None.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_None.md @@ -202,7 +202,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AppVeyor.md index 181519adb1..8beceb40d2 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AppVeyor.md @@ -216,7 +216,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AzureDevOps.md index 62ae8d6cfa..02f4717299 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_AzureDevOps.md @@ -216,7 +216,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_GitHubActions.md index e5973eefc6..e13f034f23 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_GitHubActions.md @@ -216,7 +216,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_None.md index 2bf2979877..fc15ef3936 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_Xunit_None.md @@ -216,7 +216,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md index 8f5059a5c4..3268cd3ebe 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md @@ -210,7 +210,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md index fa6b707927..dbf82377d1 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md @@ -210,7 +210,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md index 5339c6ae8c..e210c01d16 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md @@ -210,7 +210,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md index 6f0283dcd0..ae03f32357 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md @@ -210,7 +210,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Cli_Xunit_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Cli_Xunit_AppVeyor.md index 87a3359595..dec3e2daeb 100644 --- a/docs/wiz/Windows_VisualStudio_Cli_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Cli_Xunit_AppVeyor.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Cli_Xunit_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Cli_Xunit_AzureDevOps.md index 1a52f7042c..0771c1b1d0 100644 --- a/docs/wiz/Windows_VisualStudio_Cli_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Cli_Xunit_AzureDevOps.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Cli_Xunit_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Cli_Xunit_GitHubActions.md index f9059657ca..c1f61c786b 100644 --- a/docs/wiz/Windows_VisualStudio_Cli_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Cli_Xunit_GitHubActions.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Cli_Xunit_None.md b/docs/wiz/Windows_VisualStudio_Cli_Xunit_None.md index 6e4ed85d7e..2f9e6931ea 100644 --- a/docs/wiz/Windows_VisualStudio_Cli_Xunit_None.md +++ b/docs/wiz/Windows_VisualStudio_Cli_Xunit_None.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md index 3a63af496f..56a2cf2189 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md index 620a9fb3ee..f9b101b4a7 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md index 1238084098..9caac501a1 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md index 41129d42ba..b1ff9345ef 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md @@ -153,7 +153,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor ## Diff Tool diff --git a/readme.md b/readme.md index c8d0ab03ba..9c7d89825f 100644 --- a/readme.md +++ b/readme.md @@ -159,7 +159,7 @@ public class Sample } } ``` -snippet source | anchor +snippet source | anchor diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 680ee7dcd8..16292472da 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -32,10 +32,12 @@ - - + + + + \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Scrubbers/ScrubberLevelsSample.cs b/src/Verify.Xunit.Tests/Scrubbers/ScrubberLevelsSample.cs index 978530bf40..0ab8e18794 100644 --- a/src/Verify.Xunit.Tests/Scrubbers/ScrubberLevelsSample.cs +++ b/src/Verify.Xunit.Tests/Scrubbers/ScrubberLevelsSample.cs @@ -1,6 +1,4 @@ -#region ScrubberLevelsSampleXunit - -public class ScrubberLevelsSample +public class ScrubberLevelsSample { VerifySettings classLevelSettings; @@ -26,6 +24,4 @@ public Task UsageFluent() => [ModuleInitializer] public static void Initialize() => VerifierSettings.AddScrubber(_ => _.Replace("One", "A")); -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs b/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs index 2ec319602e..8bbb6ff395 100644 --- a/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs +++ b/src/Verify.Xunit.Tests/Scrubbers/ScrubbersSample.cs @@ -1,6 +1,4 @@ -#region ScrubbersSampleXunit - -public class ScrubbersSample +public class ScrubbersSample { [Fact] public Task Lines() @@ -124,6 +122,4 @@ public Task EmptyLines() => """) .ScrubEmptyLines(); -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Snippets/CompareToAssert.cs b/src/Verify.Xunit.Tests/Snippets/CompareToAssert.cs index bae4b8a383..4af97ed587 100644 --- a/src/Verify.Xunit.Tests/Snippets/CompareToAssert.cs +++ b/src/Verify.Xunit.Tests/Snippets/CompareToAssert.cs @@ -1,7 +1,5 @@ public class CompareToAssert { - #region TraditionalTest - [Fact] public void TraditionalTest() { @@ -18,16 +16,10 @@ public void TraditionalTest() Assert.Equal("USA", person.Address.Country); } - #endregion - - #region SnapshotTest - [Fact] public Task SnapshotTest() { var person = ClassBeingTested.FindPerson(); return Verify(person); } - - #endregion } \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Snippets/ComplexParametersSample.cs b/src/Verify.Xunit.Tests/Snippets/ComplexParametersSample.cs index 9388d8589a..350d1c11d3 100644 --- a/src/Verify.Xunit.Tests/Snippets/ComplexParametersSample.cs +++ b/src/Verify.Xunit.Tests/Snippets/ComplexParametersSample.cs @@ -1,6 +1,4 @@ -#region xunitComplexMemberData - -public class ComplexParametersSample +public class ComplexParametersSample { [ModuleInitializer] public static void Initialize() @@ -90,6 +88,4 @@ public static IEnumerable GetComplexMemberStructData() } public record ComplexStructData(string Value); -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Snippets/ExtensionSample.cs b/src/Verify.Xunit.Tests/Snippets/ExtensionSample.cs index 5e9b6d5485..f25946cc6c 100644 --- a/src/Verify.Xunit.Tests/Snippets/ExtensionSample.cs +++ b/src/Verify.Xunit.Tests/Snippets/ExtensionSample.cs @@ -1,6 +1,4 @@ -#region XunitExtensionSample - -public class ExtensionSample +public class ExtensionSample { [Fact] public Task AtMethod() => @@ -25,6 +23,4 @@ public Task AtMethodFluent() => """, extension: "xml"); -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Snippets/ParametersHashSample.cs b/src/Verify.Xunit.Tests/Snippets/ParametersHashSample.cs index 04e372dff0..33f30a3a7c 100644 --- a/src/Verify.Xunit.Tests/Snippets/ParametersHashSample.cs +++ b/src/Verify.Xunit.Tests/Snippets/ParametersHashSample.cs @@ -1,6 +1,4 @@ -#region UseParametersHashXunit - -public class ParametersHashSample +public class ParametersHashSample { [Theory] [InlineData("Value1")] @@ -37,6 +35,4 @@ public Task HashParametersUsageFluent(string arg) => Verify(arg) .UseParameters(arg) .HashParameters(); -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Snippets/ParametersSample.cs b/src/Verify.Xunit.Tests/Snippets/ParametersSample.cs index 08f62bf675..2948545a00 100644 --- a/src/Verify.Xunit.Tests/Snippets/ParametersSample.cs +++ b/src/Verify.Xunit.Tests/Snippets/ParametersSample.cs @@ -8,8 +8,6 @@ public static IEnumerable GetDecimalData() ]; } - #region IgnoreParametersForVerifiedXunit - [Theory] [InlineData("One")] [InlineData("Two")] @@ -20,10 +18,6 @@ public Task IgnoreParametersForVerified(string arg) return Verify("value", settings); } - #endregion - - #region IgnoreParametersForVerifiedFluentXunit - [Theory] [InlineData("One")] [InlineData("Two")] @@ -31,10 +25,6 @@ public Task IgnoreParametersForVerifiedFluent(string arg) => Verify("value") .IgnoreParametersForVerified(arg); - #endregion - - #region IgnoreParametersForVerifiedCustomParamsXunit - [Theory] [InlineData("One")] [InlineData("Two")] @@ -45,10 +35,6 @@ public Task IgnoreParametersForVerifiedCustomParams(string arg) return Verify("value", settings); } - #endregion - - #region IgnoreParametersForVerifiedCustomParamsFluentXunit - [Theory] [InlineData("One")] [InlineData("Two")] @@ -56,8 +42,6 @@ public Task IgnoreParametersForVerifiedCustomParamsFluent(string arg) => Verify("value") .IgnoreParametersForVerified($"Number{arg}"); - #endregion - [Theory] [MemberData(nameof(GetDecimalData))] public Task Decimal(decimal arg) => @@ -76,8 +60,6 @@ public Task Double(double arg) => Verify(arg) .UseParameters(arg); - #region xunitInlineData - [Theory] [InlineData("Value1")] [InlineData("Value2")] @@ -95,10 +77,6 @@ public Task InlineDataUsageFluent(string arg) => Verify(arg) .UseParameters(arg); - #endregion - - #region UseParameters - [Theory] [InlineData("Value1")] [InlineData("Value2")] @@ -109,10 +87,6 @@ public Task UseParametersUsage(string arg) .UseParameters(arg); } - #endregion - - #region UseParametersSubSet - [Theory] [InlineData("Value1", "Value2", "Value3")] public Task UseParametersSubSet(string arg1, string arg2, string arg3) @@ -122,10 +96,6 @@ public Task UseParametersSubSet(string arg1, string arg2, string arg3) .UseParameters(arg1, arg2); } - #endregion - - #region xunitMemberData - [Theory] [MemberData(nameof(GetData))] public Task MemberDataUsage(string arg) @@ -153,7 +123,6 @@ public static IEnumerable GetData() ]; } - #endregion // #region xunitAutoFixture // diff --git a/src/Verify.Xunit.Tests/Snippets/Sample.cs b/src/Verify.Xunit.Tests/Snippets/Sample.cs index 7b3aa85c6c..6cfb54ccd4 100644 --- a/src/Verify.Xunit.Tests/Snippets/Sample.cs +++ b/src/Verify.Xunit.Tests/Snippets/Sample.cs @@ -1,6 +1,4 @@ -#region SampleTestXunit - -public class Sample +public class Sample { [Fact] public Task Test() @@ -8,6 +6,4 @@ public Task Test() var person = ClassBeingTested.FindPerson(); return Verify(person); } -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Snippets/UniqueForSample.cs b/src/Verify.Xunit.Tests/Snippets/UniqueForSample.cs index 4ca2ad8f2e..286aef7c98 100644 --- a/src/Verify.Xunit.Tests/Snippets/UniqueForSample.cs +++ b/src/Verify.Xunit.Tests/Snippets/UniqueForSample.cs @@ -1,6 +1,4 @@ -#region UniqueForSampleXunit - -public class UniqueForSample +public class UniqueForSample { [Fact] public Task Runtime() @@ -61,6 +59,4 @@ public Task OSPlatform() public Task OSPlatformFluent() => Verify("value") .UniqueForOSPlatform(); -} - -#endregion \ No newline at end of file +} \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/Tests.cs b/src/Verify.Xunit.Tests/Tests.cs index 5a3fd3400c..cd9b552da4 100644 --- a/src/Verify.Xunit.Tests/Tests.cs +++ b/src/Verify.Xunit.Tests/Tests.cs @@ -5,14 +5,11 @@ public class Tests { // ReSharper disable once UnusedMember.Local static void DerivePathInfo() => - #region DerivePathInfoXUnit Verifier.DerivePathInfo( (sourceFile, projectDirectory, type, method) => new( directory: Path.Combine(projectDirectory, "Snapshots"), typeName: type.Name, methodName: method.Name)); - #endregion - [Theory] [InlineData("Value1")] @@ -36,8 +33,6 @@ public static IEnumerable GetData() => public Task StringTarget() => Verify(new Target("txt", "Value")); - #region ExplicitTargetsXunit - [Fact] public Task WithTargets() => Verify( @@ -52,8 +47,6 @@ public Task WithTargets() => name: "targetName") ]); - #endregion - [ModuleInitializer] public static void InitWithTargetsAndConverter() => VerifierSettings.RegisterFileConverter( @@ -85,33 +78,23 @@ public Task EnumerableTargets() => Verify( [ new Target( - extension: "txt", - data: "Raw target value", - name: "targetName") + extension: "txt", + data: "Raw target value", + name: "targetName") ]); static string directoryToVerify = Path.Combine(AttributeReader.GetSolutionDirectory(), "ToVerify"); - #region VerifyDirectoryXunit - [Fact] public Task WithDirectory() => VerifyDirectory(directoryToVerify); - #endregion - - #region VerifyDirectoryWithInfo - [Fact] public Task VerifyDirectoryWithInfo() => VerifyDirectory( directoryToVerify, info: "the info"); - #endregion - - #region VerifyDirectoryWithFileScrubber - [Fact] public Task VerifyDirectoryWithFileScrubber() => VerifyDirectory( @@ -125,12 +108,8 @@ public Task VerifyDirectoryWithFileScrubber() => } }); - #endregion - #if !NET48 - #region VerifyDirectoryFilterXunit - [Fact] public Task WithDirectoryFiltered() => VerifyDirectory( @@ -142,32 +121,20 @@ public Task WithDirectoryFiltered() => RecurseSubdirectories = false }); - #endregion - #endif static string zipPath = Path.Combine(AttributeReader.GetSolutionDirectory(), "ToVerify.zip"); - #region VerifyZipXunit - [Fact] public Task WithZip() => VerifyZip(zipPath); - #endregion - - #region VerifyZipWithInfo - [Fact] public Task VerifyZipWithInfo() => VerifyZip( zipPath, info: "the info"); - #endregion - - #region VerifyZipWithFileScrubber - [Fact] public Task VerifyZipWithFileScrubber() => VerifyZip( @@ -181,15 +148,9 @@ public Task VerifyZipWithFileScrubber() => } }); - #endregion - - #region VerifyZipFilterXunit - [Fact] public Task WithZipFiltered() => VerifyZip( zipPath, include: filePath => filePath.FullName.Contains("Doc")); - - #endregion } \ No newline at end of file diff --git a/src/Verify.Xunit.Tests/VerifyObjectSamples.cs b/src/Verify.Xunit.Tests/VerifyObjectSamples.cs index d0c971ac6f..6bb29436ee 100644 --- a/src/Verify.Xunit.Tests/VerifyObjectSamples.cs +++ b/src/Verify.Xunit.Tests/VerifyObjectSamples.cs @@ -20,8 +20,6 @@ public Task ScopedSerializer() return Verify(person, settings); } - #region AnonXunit - [Fact] public Task Anon() { @@ -44,8 +42,6 @@ public Task Anon() }); } - #endregion - class Person { public string GivenNames; diff --git a/src/Verify.XunitV3.DerivePaths.Tests/CustomDir/CustomTypeName.CustomMethodName.verified.txt b/src/Verify.XunitV3.DerivePaths.Tests/CustomDir/CustomTypeName.CustomMethodName.verified.txt new file mode 100644 index 0000000000..3ee291f7bd --- /dev/null +++ b/src/Verify.XunitV3.DerivePaths.Tests/CustomDir/CustomTypeName.CustomMethodName.verified.txt @@ -0,0 +1 @@ +Value \ No newline at end of file diff --git a/src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.ProjectRelativeDirectory.verified.txt b/src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.ProjectRelativeDirectory.verified.txt new file mode 100644 index 0000000000..3ee291f7bd --- /dev/null +++ b/src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.ProjectRelativeDirectory.verified.txt @@ -0,0 +1 @@ +Value \ No newline at end of file diff --git a/src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.SourceFileRelativeDirectory.verified.txt b/src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.SourceFileRelativeDirectory.verified.txt new file mode 100644 index 0000000000..3ee291f7bd --- /dev/null +++ b/src/Verify.XunitV3.DerivePaths.Tests/Relative/Tests.SourceFileRelativeDirectory.verified.txt @@ -0,0 +1 @@ +Value \ No newline at end of file diff --git a/src/Verify.XunitV3.DerivePaths.Tests/Tests.ReturnNulls.verified.txt b/src/Verify.XunitV3.DerivePaths.Tests/Tests.ReturnNulls.verified.txt new file mode 100644 index 0000000000..3ee291f7bd --- /dev/null +++ b/src/Verify.XunitV3.DerivePaths.Tests/Tests.ReturnNulls.verified.txt @@ -0,0 +1 @@ +Value \ No newline at end of file diff --git a/src/Verify.XunitV3.DerivePaths.Tests/Tests.ThrowOnConflict.verified.txt b/src/Verify.XunitV3.DerivePaths.Tests/Tests.ThrowOnConflict.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.DerivePaths.Tests/Tests.cs b/src/Verify.XunitV3.DerivePaths.Tests/Tests.cs new file mode 100644 index 0000000000..15baa1a736 --- /dev/null +++ b/src/Verify.XunitV3.DerivePaths.Tests/Tests.cs @@ -0,0 +1,70 @@ +public class Tests +{ + [Fact] + public Task Test() + { + DerivePathInfo( + (sourceFile, projectDirectory, methodName, typeName) => + { + Assert.True(File.Exists(sourceFile)); + Assert.True(Directory.Exists(projectDirectory)); + Assert.NotNull(methodName); + Assert.NotNull(typeName); + Assert.EndsWith("Verify.Xunit.DerivePaths.Tests/Tests.cs", sourceFile.Replace(@"\", "/")); + Assert.EndsWith("Verify.Xunit.DerivePaths.Tests/", projectDirectory.Replace(@"\", "/")); + return new("CustomDir", "CustomTypeName", "CustomMethodName"); + }); + return Verify("Value"); + } + + [Fact] + public Task ReturnNulls() + { + DerivePathInfo((_, _, _, _) => new(null)); + return Verify("Value"); + } + + [Fact] + public Task ProjectRelativeDirectory() + { + UseProjectRelativeDirectory("Relative"); + return Verify("Value"); + } + + [Fact] + public Task SourceFileRelativeDirectory() + { + UseSourceFileRelativeDirectory("Relative"); + return Verify("Value"); + } + + [Fact] + public Task InvalidMethod() + { + DerivePathInfo((_, _, _, _) => new(null, null, Path + .GetInvalidFileNameChars() + .First() + .ToString())); + return Assert.ThrowsAsync(() => Verify("Value")); + } + + [Fact] + public Task InvalidType() + { + DerivePathInfo((_, _, _, _) => new(null, Path + .GetInvalidFileNameChars() + .First() + .ToString())); + return Assert.ThrowsAsync(() => Verify("Value")); + } + + [Fact] + public Task InvalidDirectory() + { + DerivePathInfo((_, _, _, _) => new(Path + .GetInvalidPathChars() + .First() + .ToString())); + return Assert.ThrowsAsync(() => Verify("Value")); + } +} \ No newline at end of file diff --git a/src/Verify.XunitV3.DerivePaths.Tests/Verify.XunitV3.DerivePaths.Tests.csproj b/src/Verify.XunitV3.DerivePaths.Tests/Verify.XunitV3.DerivePaths.Tests.csproj new file mode 100644 index 0000000000..38671615c5 --- /dev/null +++ b/src/Verify.XunitV3.DerivePaths.Tests/Verify.XunitV3.DerivePaths.Tests.csproj @@ -0,0 +1,16 @@ + + + net9.0 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Inheritance/Base.TestInBase.verified.txt b/src/Verify.XunitV3.Tests/Inheritance/Base.TestInBase.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/Inheritance/Base.TestInBase.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Inheritance/Base.TestToOverride.verified.txt b/src/Verify.XunitV3.Tests/Inheritance/Base.TestToOverride.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/Inheritance/Base.TestToOverride.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Inheritance/Base.cs b/src/Verify.XunitV3.Tests/Inheritance/Base.cs new file mode 100644 index 0000000000..b9a6740425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Inheritance/Base.cs @@ -0,0 +1,10 @@ +public class Base +{ + [Fact] + public Task TestInBase() => + Verify("Foo"); + + [Fact] + public virtual Task TestToOverride() => + Verify("Foo"); +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Inheritance/Inherited.TestInBase.verified.txt b/src/Verify.XunitV3.Tests/Inheritance/Inherited.TestInBase.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/Inheritance/Inherited.TestInBase.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Inheritance/Inherited.TestToOverride.verified.txt b/src/Verify.XunitV3.Tests/Inheritance/Inherited.TestToOverride.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/Inheritance/Inherited.TestToOverride.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Inheritance/Inherited.cs b/src/Verify.XunitV3.Tests/Inheritance/Inherited.cs new file mode 100644 index 0000000000..9d06681ca8 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Inheritance/Inherited.cs @@ -0,0 +1,8 @@ +public class Inherited : Base +{ + public override Task TestToOverride() + { + Trace.WriteLine(""); + return base.TestToOverride(); + } +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/NestedTypeTests.Nested.ShouldPass.verified.txt b/src/Verify.XunitV3.Tests/NestedTypeTests.Nested.ShouldPass.verified.txt new file mode 100644 index 0000000000..3e07409a12 --- /dev/null +++ b/src/Verify.XunitV3.Tests/NestedTypeTests.Nested.ShouldPass.verified.txt @@ -0,0 +1 @@ +NestedFoo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/NestedTypeTests.ShouldPass.verified.txt b/src/Verify.XunitV3.Tests/NestedTypeTests.ShouldPass.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/NestedTypeTests.ShouldPass.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/NestedTypeTests.cs b/src/Verify.XunitV3.Tests/NestedTypeTests.cs new file mode 100644 index 0000000000..e0d9494ed1 --- /dev/null +++ b/src/Verify.XunitV3.Tests/NestedTypeTests.cs @@ -0,0 +1,13 @@ +public class NestedTypeTests +{ + [Fact] + public Task ShouldPass() => + Verify("Foo"); + + public class Nested + { + [Fact] + public Task ShouldPass() => + Verify("NestedFoo"); + } +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.AfterJson.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.AfterJson.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.Usage.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.Usage.verified.txt new file mode 100644 index 0000000000..9a30a2dffe --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.Usage.verified.txt @@ -0,0 +1 @@ +A B C \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.UsageFluent.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.UsageFluent.verified.txt new file mode 100644 index 0000000000..9a30a2dffe --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.UsageFluent.verified.txt @@ -0,0 +1 @@ +A B C \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.cs b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.cs new file mode 100644 index 0000000000..978530bf40 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubberLevelsSample.cs @@ -0,0 +1,31 @@ +#region ScrubberLevelsSampleXunit + +public class ScrubberLevelsSample +{ + VerifySettings classLevelSettings; + + public ScrubberLevelsSample() + { + classLevelSettings = new(); + classLevelSettings.AddScrubber(_ => _.Replace("Three", "C")); + } + + [Fact] + public Task Usage() + { + var settings = new VerifySettings(classLevelSettings); + settings.AddScrubber(_ => _.Replace("Two", "B")); + return Verify("One Two Three", settings); + } + + [Fact] + public Task UsageFluent() => + Verify("One Two Three", classLevelSettings) + .AddScrubber(_ => _.Replace("Two", "B")); + + [ModuleInitializer] + public static void Initialize() => + VerifierSettings.AddScrubber(_ => _.Replace("One", "A")); +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerialization.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerialization.verified.txt new file mode 100644 index 0000000000..412d4ef282 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerialization.verified.txt @@ -0,0 +1,3 @@ +{ + RowVersion: TheRowVersion +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerializationFluent.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerializationFluent.verified.txt new file mode 100644 index 0000000000..412d4ef282 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.AfterSerializationFluent.verified.txt @@ -0,0 +1,3 @@ +{ + RowVersion: TheRowVersion +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLine.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLine.verified.txt new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLine.verified.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLines.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLines.verified.txt new file mode 100644 index 0000000000..cc1c56c30c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.EmptyLines.verified.txt @@ -0,0 +1,2 @@ +LineA +LineC \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.Lines.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.Lines.verified.txt new file mode 100644 index 0000000000..a40c89c9b9 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.Lines.verified.txt @@ -0,0 +1,4 @@ +LineA +LineC +NoMoreLineE +LineI \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.LinesFluent.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.LinesFluent.verified.txt new file mode 100644 index 0000000000..a40c89c9b9 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.LinesFluent.verified.txt @@ -0,0 +1,4 @@ +LineA +LineC +NoMoreLineE +LineI \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.RemoveOrReplace.verified.txt b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.RemoveOrReplace.verified.txt new file mode 100644 index 0000000000..1e66edef54 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.RemoveOrReplace.verified.txt @@ -0,0 +1,2 @@ +linea +linec \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.cs b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.cs new file mode 100644 index 0000000000..2ec319602e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Scrubbers/ScrubbersSample.cs @@ -0,0 +1,129 @@ +#region ScrubbersSampleXunit + +public class ScrubbersSample +{ + [Fact] + public Task Lines() + { + var settings = new VerifySettings(); + settings.ScrubLinesWithReplace( + replaceLine: line => + { + if (line.Contains("LineE")) + { + return "NoMoreLineE"; + } + + return line; + }); + settings.ScrubLines(removeLine: _ => _.Contains('J')); + settings.ScrubLinesContaining("b", "D"); + settings.ScrubLinesContaining(StringComparison.Ordinal, "H"); + return Verify( + settings: settings, + target: """ + LineA + LineB + LineC + LineD + LineE + LineH + LineI + LineJ + """); + } + + [Fact] + public Task EmptyLine() + { + var settings = new VerifySettings(); + settings.ScrubLinesWithReplace( + replaceLine: _ => ""); + return Verify( + settings: settings, + target: ""); + } + + [Fact] + public Task LinesFluent() => + Verify(""" + LineA + LineB + LineC + LineD + LineE + LineH + LineI + LineJ + """) + .ScrubLinesWithReplace( + replaceLine: _ => + { + if (_.Contains("LineE")) + { + return "NoMoreLineE"; + } + + return _; + }) + .ScrubLines(removeLine: _ => _.Contains('J')) + .ScrubLinesContaining("b", "D") + .ScrubLinesContaining(StringComparison.Ordinal, "H"); + + [Fact] + public Task AfterSerialization() + { + var target = new ToBeScrubbed + { + RowVersion = "7D3" + }; + + var settings = new VerifySettings(); + settings.AddScrubber( + _ => _.Replace("7D3", "TheRowVersion")); + return Verify(target, settings); + } + + [Fact] + public Task AfterSerializationFluent() + { + var target = new ToBeScrubbed + { + RowVersion = "7D3" + }; + + return Verify(target) + .AddScrubber(_ => _.Replace("7D3", "TheRowVersion")); + } + + [Fact] + public Task RemoveOrReplace() => + Verify(""" + LineA + LineB + LineC + """) + .ScrubLinesWithReplace( + replaceLine: line => + { + if (line.Contains("LineB")) + { + return null; + } + + return line.ToLower(); + }); + + [Fact] + public Task EmptyLines() => + Verify(""" + + LineA + + LineC + + """) + .ScrubEmptyLines(); +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/CompareToAssert.SnapshotTest.verified.txt b/src/Verify.XunitV3.Tests/Snippets/CompareToAssert.SnapshotTest.verified.txt new file mode 100644 index 0000000000..19767241bc --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/CompareToAssert.SnapshotTest.verified.txt @@ -0,0 +1,14 @@ +{ + GivenNames: John, + FamilyName: Smith, + Spouse: Jill, + Address: { + Street: 4 Puddle Lane, + Country: USA + }, + Children: [ + Sam, + Mary + ], + Id: Guid_1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/CompareToAssert.cs b/src/Verify.XunitV3.Tests/Snippets/CompareToAssert.cs new file mode 100644 index 0000000000..bae4b8a383 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/CompareToAssert.cs @@ -0,0 +1,33 @@ +public class CompareToAssert +{ + #region TraditionalTest + + [Fact] + public void TraditionalTest() + { + var person = ClassBeingTested.FindPerson(); + Assert.Equal(new("ebced679-45d3-4653-8791-3d969c4a986c"), person.Id); + Assert.Equal(Title.Mr, person.Title); + Assert.Equal("John", person.GivenNames); + Assert.Equal("Smith", person.FamilyName); + Assert.Equal("Jill", person.Spouse); + Assert.Equal(2, person.Children.Count); + Assert.Equal("Sam", person.Children[0]); + Assert.Equal("Mary", person.Children[1]); + Assert.Equal("4 Puddle Lane", person.Address.Street); + Assert.Equal("USA", person.Address.Country); + } + + #endregion + + #region SnapshotTest + + [Fact] + public Task SnapshotTest() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } + + #endregion +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=ComplexParametersSample+ComplexData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=ComplexParametersSample+ComplexData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberDataFluent_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=ComplexParametersSample+ComplexData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=ComplexParametersSample+ComplexData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberData_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableDataFluent_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableData_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=ComplexParametersSample+ComplexStructData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=ComplexParametersSample+ComplexStructData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructDataFluent_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=ComplexParametersSample+ComplexStructData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=ComplexParametersSample+ComplexStructData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberNullableStructData_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=ComplexParametersSample+ComplexStructData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=ComplexParametersSample+ComplexStructData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructDataFluent_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=ComplexParametersSample+ComplexStructData.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=ComplexParametersSample+ComplexStructData.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value1.verified.txt new file mode 100644 index 0000000000..669f15396c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value1.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value2.verified.txt new file mode 100644 index 0000000000..3aff002a6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.ComplexMemberStructData_arg=Value2.verified.txt @@ -0,0 +1,3 @@ +{ + Value: Value2 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.cs b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.cs new file mode 100644 index 0000000000..9388d8589a --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ComplexParametersSample.cs @@ -0,0 +1,95 @@ +#region xunitComplexMemberData + +public class ComplexParametersSample +{ + [ModuleInitializer] + public static void Initialize() + { + VerifierSettings.NameForParameter(_ => _.Value); + VerifierSettings.NameForParameter(_ => _.Value); + } + + [Theory] + [MemberData(nameof(GetComplexMemberData))] + public Task ComplexMemberData(ComplexData arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [MemberData(nameof(GetComplexMemberData))] + public Task ComplexMemberDataFluent(ComplexData arg) => + Verify(arg) + .UseParameters(arg); + + [Theory] + [MemberData(nameof(GetComplexMemberData))] + public Task ComplexMemberNullableData(ComplexData arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [MemberData(nameof(GetComplexMemberData))] + public Task ComplexMemberNullableDataFluent(ComplexData arg) => + Verify(arg) + .UseParameters(arg); + + public static IEnumerable GetComplexMemberData() + { + yield return + [ + new ComplexData("Value1") + ]; + yield return + [ + new ComplexData("Value2") + ]; + } + + public record ComplexData(string Value); + + [Theory] + [MemberData(nameof(GetComplexMemberStructData))] + public Task ComplexMemberStructData(ComplexStructData arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [MemberData(nameof(GetComplexMemberStructData))] + public Task ComplexMemberStructDataFluent(ComplexStructData arg) => + Verify(arg) + .UseParameters(arg); + + [Theory] + [MemberData(nameof(GetComplexMemberStructData))] + public Task ComplexMemberNullableStructData(ComplexStructData arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [MemberData(nameof(GetComplexMemberStructData))] + public Task ComplexMemberNullableStructDataFluent(ComplexStructData arg) => + Verify(arg) + .UseParameters(arg); + + public static IEnumerable GetComplexMemberStructData() + { + yield return [new ComplexStructData("Value1")]; + yield return [new ComplexStructData("Value2")]; + } + + public record ComplexStructData(string Value); +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethod.verified.xml b/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethod.verified.xml new file mode 100644 index 0000000000..e4fae77281 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethod.verified.xml @@ -0,0 +1,5 @@ + + Joe + Kim + Reminder + \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethodFluent.verified.xml b/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethodFluent.verified.xml new file mode 100644 index 0000000000..e4fae77281 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.AtMethodFluent.verified.xml @@ -0,0 +1,5 @@ + + Joe + Kim + Reminder + \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.cs b/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.cs new file mode 100644 index 0000000000..5e9b6d5485 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ExtensionSample.cs @@ -0,0 +1,30 @@ +#region XunitExtensionSample + +public class ExtensionSample +{ + [Fact] + public Task AtMethod() => + Verify( + target: """ + + Joe + Kim + Reminder + + """, + extension: "xml"); + + [Fact] + public Task AtMethodFluent() => + Verify( + target: """ + + Joe + Kim + Reminder + + """, + extension: "xml"); +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_25a91d2c54f27235.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_25a91d2c54f27235.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_25a91d2c54f27235.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_80cceeb56ef4cffc.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_80cceeb56ef4cffc.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsageFluent_80cceeb56ef4cffc.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_25a91d2c54f27235.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_25a91d2c54f27235.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_25a91d2c54f27235.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_80cceeb56ef4cffc.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_80cceeb56ef4cffc.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.HashParametersUsage_80cceeb56ef4cffc.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_25a91d2c54f27235.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_25a91d2c54f27235.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_25a91d2c54f27235.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_80cceeb56ef4cffc.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_80cceeb56ef4cffc.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsageFluent_80cceeb56ef4cffc.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_25a91d2c54f27235.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_25a91d2c54f27235.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_25a91d2c54f27235.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_80cceeb56ef4cffc.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_80cceeb56ef4cffc.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.UseHashedParametersUsage_80cceeb56ef4cffc.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.cs b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.cs new file mode 100644 index 0000000000..04e372dff0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersHashSample.cs @@ -0,0 +1,42 @@ +#region UseParametersHashXunit + +public class ParametersHashSample +{ + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task UseHashedParametersUsage(string arg) + { + var settings = new VerifySettings(); + settings.UseHashedParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task UseHashedParametersUsageFluent(string arg) => + Verify(arg) + .UseHashedParameters(arg); + + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task HashParametersUsage(string arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + settings.HashParameters(); + return Verify(arg, settings); + } + + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task HashParametersUsageFluent(string arg) => + Verify(arg) + .UseParameters(arg) + .HashParameters(); +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Decimal_arg=1.1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Decimal_arg=1.1.verified.txt new file mode 100644 index 0000000000..8ab02375ee --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Decimal_arg=1.1.verified.txt @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Double_arg=1.1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Double_arg=1.1.verified.txt new file mode 100644 index 0000000000..8ab02375ee --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Double_arg=1.1.verified.txt @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Float_arg=1.1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Float_arg=1.1.verified.txt new file mode 100644 index 0000000000..8ab02375ee --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.Float_arg=1.1.verified.txt @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerified.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerified.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerified.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParams.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParams.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParams.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParamsFluent.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParamsFluent.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedCustomParamsFluent.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedFluent.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedFluent.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.IgnoreParametersForVerifiedFluent.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value1.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value1.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value2.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsageFluent_arg=Value2.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value1.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value1.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value10.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value10.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value2.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value2.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value3.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value3.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value5.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value5.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value9.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.InlineDataUsage_arg=Value9.verified.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value1.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value1.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value2.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsageFluent_arg=Value2.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value1.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value1.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value2.verified.txt new file mode 100644 index 0000000000..3696843c5e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.MemberDataUsage_arg=Value2.verified.txt @@ -0,0 +1 @@ +Value2 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersSubSet_arg1=Value1_arg2=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersSubSet_arg1=Value1_arg2=Value2.verified.txt new file mode 100644 index 0000000000..32a79b370d --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersSubSet_arg1=Value1_arg2=Value2.verified.txt @@ -0,0 +1 @@ +Value1 Value2 Value3 some text \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value1.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value1.verified.txt new file mode 100644 index 0000000000..013b3d754c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value1.verified.txt @@ -0,0 +1 @@ +Value1 some text \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value2.verified.txt b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value2.verified.txt new file mode 100644 index 0000000000..89afeb0f95 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.UseParametersUsage_arg=Value2.verified.txt @@ -0,0 +1 @@ +Value2 some text \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/ParametersSample.cs b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.cs new file mode 100644 index 0000000000..08f62bf675 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/ParametersSample.cs @@ -0,0 +1,174 @@ +public class ParametersSample +{ + public static IEnumerable GetDecimalData() + { + yield return + [ + (decimal) 1.1 + ]; + } + + #region IgnoreParametersForVerifiedXunit + + [Theory] + [InlineData("One")] + [InlineData("Two")] + public Task IgnoreParametersForVerified(string arg) + { + var settings = new VerifySettings(); + settings.IgnoreParametersForVerified(arg); + return Verify("value", settings); + } + + #endregion + + #region IgnoreParametersForVerifiedFluentXunit + + [Theory] + [InlineData("One")] + [InlineData("Two")] + public Task IgnoreParametersForVerifiedFluent(string arg) => + Verify("value") + .IgnoreParametersForVerified(arg); + + #endregion + + #region IgnoreParametersForVerifiedCustomParamsXunit + + [Theory] + [InlineData("One")] + [InlineData("Two")] + public Task IgnoreParametersForVerifiedCustomParams(string arg) + { + var settings = new VerifySettings(); + settings.IgnoreParametersForVerified($"Number{arg}"); + return Verify("value", settings); + } + + #endregion + + #region IgnoreParametersForVerifiedCustomParamsFluentXunit + + [Theory] + [InlineData("One")] + [InlineData("Two")] + public Task IgnoreParametersForVerifiedCustomParamsFluent(string arg) => + Verify("value") + .IgnoreParametersForVerified($"Number{arg}"); + + #endregion + + [Theory] + [MemberData(nameof(GetDecimalData))] + public Task Decimal(decimal arg) => + Verify(arg) + .UseParameters(arg); + + [Theory] + [InlineData((float) 1.1)] + public Task Float(float arg) => + Verify(arg) + .UseParameters(arg); + + [Theory] + [InlineData(1.1d)] + public Task Double(double arg) => + Verify(arg) + .UseParameters(arg); + + #region xunitInlineData + + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task InlineDataUsage(string arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task InlineDataUsageFluent(string arg) => + Verify(arg) + .UseParameters(arg); + + #endregion + + #region UseParameters + + [Theory] + [InlineData("Value1")] + [InlineData("Value2")] + public Task UseParametersUsage(string arg) + { + var somethingToVerify = $"{arg} some text"; + return Verify(somethingToVerify) + .UseParameters(arg); + } + + #endregion + + #region UseParametersSubSet + + [Theory] + [InlineData("Value1", "Value2", "Value3")] + public Task UseParametersSubSet(string arg1, string arg2, string arg3) + { + var somethingToVerify = $"{arg1} {arg2} {arg3} some text"; + return Verify(somethingToVerify) + .UseParameters(arg1, arg2); + } + + #endregion + + #region xunitMemberData + + [Theory] + [MemberData(nameof(GetData))] + public Task MemberDataUsage(string arg) + { + var settings = new VerifySettings(); + settings.UseParameters(arg); + return Verify(arg, settings); + } + + [Theory] + [MemberData(nameof(GetData))] + public Task MemberDataUsageFluent(string arg) => + Verify(arg) + .UseParameters(arg); + + public static IEnumerable GetData() + { + yield return + [ + "Value1" + ]; + yield return + [ + "Value2" + ]; + } + + #endregion + + // #region xunitAutoFixture + // + // [Theory] + // [InlineAutoData(42)] + // public Task AutoFixtureUsage(int stable, string random1, string random2) + // { + // var result = MethodBeingTested(stable, random1, random2); + // return Verify(result) + // .UseParameters(stable); + // } + // + // #endregion + // + // // ReSharper disable UnusedParameter.Local + // static int MethodBeingTested(int stable, string random1, string random2) => + // stable; +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/Sample.Test.verified.txt b/src/Verify.XunitV3.Tests/Snippets/Sample.Test.verified.txt new file mode 100644 index 0000000000..19767241bc --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/Sample.Test.verified.txt @@ -0,0 +1,14 @@ +{ + GivenNames: John, + FamilyName: Smith, + Spouse: Jill, + Address: { + Street: 4 Puddle Lane, + Country: USA + }, + Children: [ + Sam, + Mary + ], + Id: Guid_1 +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/Sample.cs b/src/Verify.XunitV3.Tests/Snippets/Sample.cs new file mode 100644 index 0000000000..7b3aa85c6c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/Sample.cs @@ -0,0 +1,13 @@ +#region SampleTestXunit + +public class Sample +{ + [Fact] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Architecture.x64.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Architecture.x64.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Architecture.x64.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.ArchitectureFluent.x64.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.ArchitectureFluent.x64.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.ArchitectureFluent.x64.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Debug.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Debug.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Debug.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Release.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Release.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfiguration.Release.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Debug.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Debug.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Debug.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Release.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Release.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.AssemblyConfigurationFluent.Release.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Linux.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Linux.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Linux.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.OSX.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.OSX.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.OSX.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Windows.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Windows.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatform.Windows.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Linux.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Linux.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Linux.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.OSX.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.OSX.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.OSX.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Windows.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Windows.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.OSPlatformFluent.Windows.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.DotNet.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.DotNet.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.DotNet.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.Net.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.Net.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.Runtime.Net.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet7_0.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet7_0.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet7_0.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet8_0.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet8_0.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet8_0.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet9_0.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet9_0.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.DotNet9_0.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.Net4_8.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.Net4_8.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeAndVersion.Net4_8.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.DotNet.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.DotNet.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.DotNet.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.Net.verified.txt b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.Net.verified.txt new file mode 100644 index 0000000000..3c877c57a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.RuntimeFluent.Net.verified.txt @@ -0,0 +1 @@ +value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.cs b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.cs new file mode 100644 index 0000000000..4ca2ad8f2e --- /dev/null +++ b/src/Verify.XunitV3.Tests/Snippets/UniqueForSample.cs @@ -0,0 +1,66 @@ +#region UniqueForSampleXunit + +public class UniqueForSample +{ + [Fact] + public Task Runtime() + { + var settings = new VerifySettings(); + settings.UniqueForRuntime(); + return Verify("value", settings); + } + + [Fact] + public Task RuntimeFluent() => + Verify("value") + .UniqueForRuntime(); + + [Fact] + public Task RuntimeAndVersion() + { + var settings = new VerifySettings(); + settings.UniqueForRuntimeAndVersion(); + return Verify("value", settings); + } + + [Fact] + public Task AssemblyConfiguration() + { + var settings = new VerifySettings(); + settings.UniqueForAssemblyConfiguration(); + return Verify("value", settings); + } + + [Fact] + public Task AssemblyConfigurationFluent() => + Verify("value") + .UniqueForAssemblyConfiguration(); + + [Fact] + public Task Architecture() + { + var settings = new VerifySettings(); + settings.UniqueForArchitecture(); + return Verify("value", settings); + } + + [Fact] + public Task ArchitectureFluent() => + Verify("value") + .UniqueForArchitecture(); + + [Fact] + public Task OSPlatform() + { + var settings = new VerifySettings(); + settings.UniqueForOSPlatform(); + return Verify("value", settings); + } + + [Fact] + public Task OSPlatformFluent() => + Verify("value") + .UniqueForOSPlatform(); +} + +#endregion \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.EnumerableTargets#targetName.verified.txt b/src/Verify.XunitV3.Tests/Tests.EnumerableTargets#targetName.verified.txt new file mode 100644 index 0000000000..02ba487260 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.EnumerableTargets#targetName.verified.txt @@ -0,0 +1 @@ +Raw target value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.MissingParameter.verified.txt b/src/Verify.XunitV3.Tests/Tests.MissingParameter.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.MissingParameter.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.StringTarget.verified.txt b/src/Verify.XunitV3.Tests/Tests.StringTarget.verified.txt new file mode 100644 index 0000000000..3ee291f7bd --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.StringTarget.verified.txt @@ -0,0 +1 @@ +Value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/TextDoc.verified.txt new file mode 100644 index 0000000000..a768159ab6 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/TextDoc.verified.txt @@ -0,0 +1 @@ +New text \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/toConvert.verified.VerifyDirectoryTests b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/toConvert.verified.VerifyDirectoryTests new file mode 100644 index 0000000000..6b584e8ece --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithFileScrubber/toConvert.verified.VerifyDirectoryTests @@ -0,0 +1 @@ +content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/TextDoc.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/TextDoc.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/target.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/target.verified.txt new file mode 100644 index 0000000000..fd9e33b5a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/target.verified.txt @@ -0,0 +1 @@ +the info \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/toConvert.verified.VerifyDirectoryTests b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/toConvert.verified.VerifyDirectoryTests new file mode 100644 index 0000000000..6b584e8ece --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyDirectoryWithInfo/toConvert.verified.VerifyDirectoryTests @@ -0,0 +1 @@ +content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/TextDoc.verified.txt new file mode 100644 index 0000000000..a768159ab6 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/TextDoc.verified.txt @@ -0,0 +1 @@ +New text \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/toConvert.verified.VerifyDirectoryTests b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/toConvert.verified.VerifyDirectoryTests new file mode 100644 index 0000000000..6b584e8ece --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithFileScrubber/toConvert.verified.VerifyDirectoryTests @@ -0,0 +1 @@ +content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/TextDoc.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/TextDoc.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/target.verified.txt b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/target.verified.txt new file mode 100644 index 0000000000..fd9e33b5a0 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/target.verified.txt @@ -0,0 +1 @@ +the info \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/toConvert.verified.VerifyDirectoryTests b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/toConvert.verified.VerifyDirectoryTests new file mode 100644 index 0000000000..6b584e8ece --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.VerifyZipWithInfo/toConvert.verified.VerifyDirectoryTests @@ -0,0 +1 @@ +content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.WithDirectory/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithDirectory/TextDoc.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/TextDoc.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectory/toConvert.verified.VerifyDirectoryTests b/src/Verify.XunitV3.Tests/Tests.WithDirectory/toConvert.verified.VerifyDirectoryTests new file mode 100644 index 0000000000..6b584e8ece --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectory/toConvert.verified.VerifyDirectoryTests @@ -0,0 +1 @@ +content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithDirectoryFiltered/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithDirectoryFiltered/TextDoc.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithDirectoryFiltered/TextDoc.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithTargets#targetName.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithTargets#targetName.verified.txt new file mode 100644 index 0000000000..02ba487260 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithTargets#targetName.verified.txt @@ -0,0 +1 @@ +Raw target value \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithTargets.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithTargets.verified.txt new file mode 100644 index 0000000000..810fc73050 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithTargets.verified.txt @@ -0,0 +1,3 @@ +{ + Property: Value +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#00.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#00.verified.txt new file mode 100644 index 0000000000..810fc73050 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#00.verified.txt @@ -0,0 +1,3 @@ +{ + Property: Value +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#01.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#01.verified.txt new file mode 100644 index 0000000000..c8d88f9c1f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#01.verified.txt @@ -0,0 +1 @@ +theInfo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#02.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#02.verified.txt new file mode 100644 index 0000000000..ac4b99ebc7 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithTargetsAndConverter#02.verified.txt @@ -0,0 +1 @@ +text from converter \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.WithZip/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithZip/TextDoc.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/TextDoc.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithZip/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZip/toConvert.verified.VerifyDirectoryTests b/src/Verify.XunitV3.Tests/Tests.WithZip/toConvert.verified.VerifyDirectoryTests new file mode 100644 index 0000000000..6b584e8ece --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZip/toConvert.verified.VerifyDirectoryTests @@ -0,0 +1 @@ +content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..2c47b8ae97 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Sample content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/TextDoc.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/TextDoc.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/TextDoc.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/.verified.TextDocStartingWithDot b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/.verified.TextDocStartingWithDot new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/.verified.TextDocStartingWithDot @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDoc2.verified.txt new file mode 100644 index 0000000000..0bf90d8035 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDoc2.verified.txt @@ -0,0 +1 @@ +Another text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDocWithoutExtension.verified.noextension b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDocWithoutExtension.verified.noextension new file mode 100644 index 0000000000..f68255144f --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested.with.dot/TextDocWithoutExtension.verified.noextension @@ -0,0 +1 @@ +Some text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested/TextDoc2.verified.txt b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested/TextDoc2.verified.txt new file mode 100644 index 0000000000..640c5ea425 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.WithZipFiltered/nested/TextDoc2.verified.txt @@ -0,0 +1 @@ +Text content \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Tests.cs b/src/Verify.XunitV3.Tests/Tests.cs new file mode 100644 index 0000000000..5a3fd3400c --- /dev/null +++ b/src/Verify.XunitV3.Tests/Tests.cs @@ -0,0 +1,195 @@ +// ReSharper disable UnusedParameter.Local + +// ReSharper disable ArrangeObjectCreationWhenTypeNotEvident +public class Tests +{ + // ReSharper disable once UnusedMember.Local + static void DerivePathInfo() => + #region DerivePathInfoXUnit + Verifier.DerivePathInfo( + (sourceFile, projectDirectory, type, method) => new( + directory: Path.Combine(projectDirectory, "Snapshots"), + typeName: type.Name, + methodName: method.Name)); + #endregion + + + [Theory] + [InlineData("Value1")] + public Task MissingParameter(string arg) => + Verify("Foo"); + + [Theory] + [MemberData(nameof(GetData))] + public Task UseFileNameWithParam(string arg) => + Verify(arg) + .UseFileName("UseFileNameWithParam"); + + public static IEnumerable GetData() => + [ + [ + "Value1" + ] + ]; + + [Fact] + public Task StringTarget() => + Verify(new Target("txt", "Value")); + + #region ExplicitTargetsXunit + + [Fact] + public Task WithTargets() => + Verify( + new + { + Property = "Value" + }, + [ + new( + extension: "txt", + data: "Raw target value", + name: "targetName") + ]); + + #endregion + + [ModuleInitializer] + public static void InitWithTargetsAndConverter() => + VerifierSettings.RegisterFileConverter( + "WithTargetsAndConverter", + (_, _) => + new( + "theInfo", + new List + { + new("txt", "text from converter") + })); + + [Fact] + public Task WithTargetsAndConverter() => + Verify( + new + { + Property = "Value" + }, + [ + new( + extension: "WithTargetsAndConverter", + data: new MemoryStream(), + name: "targetName") + ]); + + [Fact] + public Task EnumerableTargets() => + Verify( + [ + new Target( + extension: "txt", + data: "Raw target value", + name: "targetName") + ]); + + static string directoryToVerify = Path.Combine(AttributeReader.GetSolutionDirectory(), "ToVerify"); + + #region VerifyDirectoryXunit + + [Fact] + public Task WithDirectory() => + VerifyDirectory(directoryToVerify); + + #endregion + + #region VerifyDirectoryWithInfo + + [Fact] + public Task VerifyDirectoryWithInfo() => + VerifyDirectory( + directoryToVerify, + info: "the info"); + + #endregion + + #region VerifyDirectoryWithFileScrubber + + [Fact] + public Task VerifyDirectoryWithFileScrubber() => + VerifyDirectory( + directoryToVerify, + fileScrubber: (path, builder) => + { + if (Path.GetFileName(path) == "TextDoc.txt") + { + builder.Clear(); + builder.Append("New text"); + } + }); + + #endregion + +#if !NET48 + + #region VerifyDirectoryFilterXunit + + [Fact] + public Task WithDirectoryFiltered() => + VerifyDirectory( + directoryToVerify, + include: filePath => filePath.Contains("Doc"), + pattern: "*.txt", + options: new() + { + RecurseSubdirectories = false + }); + + #endregion + +#endif + + static string zipPath = Path.Combine(AttributeReader.GetSolutionDirectory(), "ToVerify.zip"); + + #region VerifyZipXunit + + [Fact] + public Task WithZip() => + VerifyZip(zipPath); + + #endregion + + #region VerifyZipWithInfo + + [Fact] + public Task VerifyZipWithInfo() => + VerifyZip( + zipPath, + info: "the info"); + + #endregion + + #region VerifyZipWithFileScrubber + + [Fact] + public Task VerifyZipWithFileScrubber() => + VerifyZip( + zipPath, + fileScrubber: (path, builder) => + { + if (Path.GetFileName(path) == "TextDoc.txt") + { + builder.Clear(); + builder.Append("New text"); + } + }); + + #endregion + + #region VerifyZipFilterXunit + + [Fact] + public Task WithZipFiltered() => + VerifyZip( + zipPath, + include: filePath => filePath.FullName.Contains("Doc")); + + #endregion +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/UseFileNameWithParam.verified.txt b/src/Verify.XunitV3.Tests/UseFileNameWithParam.verified.txt new file mode 100644 index 0000000000..39d0344b5c --- /dev/null +++ b/src/Verify.XunitV3.Tests/UseFileNameWithParam.verified.txt @@ -0,0 +1 @@ +Value1 \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/Verify.XunitV3.Tests.csproj b/src/Verify.XunitV3.Tests/Verify.XunitV3.Tests.csproj new file mode 100644 index 0000000000..aa2ef68298 --- /dev/null +++ b/src/Verify.XunitV3.Tests/Verify.XunitV3.Tests.csproj @@ -0,0 +1,33 @@ + + + + net48 + $(TargetFrameworks);net9.0 + true + win-x64 + x64 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/VerifyObjectSamples.Anon.verified.txt b/src/Verify.XunitV3.Tests/VerifyObjectSamples.Anon.verified.txt new file mode 100644 index 0000000000..a1f0637552 --- /dev/null +++ b/src/Verify.XunitV3.Tests/VerifyObjectSamples.Anon.verified.txt @@ -0,0 +1,10 @@ +{ + person1: { + GivenNames: John, + FamilyName: Smith + }, + person2: { + GivenNames: Marianne, + FamilyName: Aguirre + } +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/VerifyObjectSamples.ScopedSerializer.verified.txt b/src/Verify.XunitV3.Tests/VerifyObjectSamples.ScopedSerializer.verified.txt new file mode 100644 index 0000000000..517a0f7d15 --- /dev/null +++ b/src/Verify.XunitV3.Tests/VerifyObjectSamples.ScopedSerializer.verified.txt @@ -0,0 +1,5 @@ +{ + $type: VerifyObjectSamples.Person, + GivenNames: John, + FamilyName: Smith +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/VerifyObjectSamples.cs b/src/Verify.XunitV3.Tests/VerifyObjectSamples.cs new file mode 100644 index 0000000000..d0c971ac6f --- /dev/null +++ b/src/Verify.XunitV3.Tests/VerifyObjectSamples.cs @@ -0,0 +1,64 @@ +using Argon; + +// ReSharper disable NotAccessedField.Local + +// Non-nullable field is uninitialized +#pragma warning disable CS8618 + +public class VerifyObjectSamples +{ + [Fact] + public Task ScopedSerializer() + { + var person = new Person + { + GivenNames = "John", + FamilyName = "Smith" + }; + var settings = new VerifySettings(); + settings.AddExtraSettings(_ => _.TypeNameHandling = TypeNameHandling.All); + return Verify(person, settings); + } + + #region AnonXunit + + [Fact] + public Task Anon() + { + var person1 = new Person + { + GivenNames = "John", + FamilyName = "Smith" + }; + var person2 = new Person + { + GivenNames = "Marianne", + FamilyName = "Aguirre" + }; + + return Verify( + new + { + person1, + person2 + }); + } + + #endregion + + class Person + { + public string GivenNames; + public string FamilyName; + public string Spouse; + public Address Address; + public DateTimeOffset Dob; + } + + class Address + { + public string Street; + public string Country; + public string Suburb; + } +} \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/VerifyTextSample.Simple.verified.txt b/src/Verify.XunitV3.Tests/VerifyTextSample.Simple.verified.txt new file mode 100644 index 0000000000..fdf74cdc4b --- /dev/null +++ b/src/Verify.XunitV3.Tests/VerifyTextSample.Simple.verified.txt @@ -0,0 +1 @@ +Foo \ No newline at end of file diff --git a/src/Verify.XunitV3.Tests/VerifyTextSample.cs b/src/Verify.XunitV3.Tests/VerifyTextSample.cs new file mode 100644 index 0000000000..4c0c482fca --- /dev/null +++ b/src/Verify.XunitV3.Tests/VerifyTextSample.cs @@ -0,0 +1,6 @@ +public class VerifyTextSample +{ + [Fact] + public Task Simple() => + Verify("Foo"); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/DerivePaths/DerivePathInfo.cs b/src/Verify.XunitV3/DerivePaths/DerivePathInfo.cs new file mode 100644 index 0000000000..4e09b07533 --- /dev/null +++ b/src/Verify.XunitV3/DerivePaths/DerivePathInfo.cs @@ -0,0 +1,10 @@ +namespace VerifyXunit; + +/// +/// Signature for deriving a custom path information for `.verified.` files. +/// +/// The source file derived from . +/// The directory of the project that the test was compile from. +/// The class the test method exists in. +/// The test method. +public delegate PathInfo DerivePathInfo(string sourceFile, string projectDirectory, Type type, MethodInfo method); \ No newline at end of file diff --git a/src/Verify.XunitV3/DerivePaths/Verifier.cs b/src/Verify.XunitV3/DerivePaths/Verifier.cs new file mode 100644 index 0000000000..702b17ee1c --- /dev/null +++ b/src/Verify.XunitV3/DerivePaths/Verifier.cs @@ -0,0 +1,43 @@ +// ReSharper disable UnusedParameter.Local + +#pragma warning disable VerifyTestsProjectDir +namespace VerifyXunit; + +public partial class Verifier +{ + static DerivePathInfo derivePathInfo = PathInfo.DeriveDefault; + + internal static PathInfo GetPathInfo(string sourceFile, Type type, MethodInfo method) => + derivePathInfo(sourceFile, VerifierSettings.ProjectDir, type, method); + + /// + /// Use custom path information for `.verified.` files. + /// + /// + /// This is sometimes needed on CI systems that move/remove the original source. + /// To move to this approach, any existing `.verified.` files will need to be moved to the new directory + /// + /// Custom callback to control the behavior. + public static void DerivePathInfo(DerivePathInfo derivePathInfo) => + Verifier.derivePathInfo = derivePathInfo; + + /// + /// Use a directory relative to the project directory for storing for `.verified.` files. + /// + public static void UseProjectRelativeDirectory(string directory) => + DerivePathInfo( + (sourceFile, projectDirectory, type, method) => new( + directory: Path.Combine(projectDirectory, directory), + typeName: type.NameWithParent(), + methodName: method.Name)); + + /// + /// Use a directory relative to the source file directory for storing for `.verified.` files. + /// + public static void UseSourceFileRelativeDirectory(string directory) => + DerivePathInfo( + (sourceFile, projectDirectory, type, method) => new( + directory: Path.Combine(Path.GetDirectoryName(sourceFile)!, directory), + typeName: type.NameWithParent(), + methodName: method.Name)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/GlobalUsings.cs b/src/Verify.XunitV3/GlobalUsings.cs new file mode 100644 index 0000000000..f0226b5a70 --- /dev/null +++ b/src/Verify.XunitV3/GlobalUsings.cs @@ -0,0 +1,5 @@ +global using System.Diagnostics.Contracts; +global using Xunit; +global using Xunit.Sdk; +global using VerifyTests; +global using Argon; \ No newline at end of file diff --git a/src/Verify.XunitV3/InternalsVisibleTo.cs b/src/Verify.XunitV3/InternalsVisibleTo.cs new file mode 100644 index 0000000000..c3b687417c --- /dev/null +++ b/src/Verify.XunitV3/InternalsVisibleTo.cs @@ -0,0 +1 @@ +[assembly: InternalsVisibleTo("Verify.XunitV3.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier.cs b/src/Verify.XunitV3/Verifier.cs new file mode 100644 index 0000000000..3756d6295d --- /dev/null +++ b/src/Verify.XunitV3/Verifier.cs @@ -0,0 +1,86 @@ +using Xunit.v3; + +namespace VerifyXunit; + +public static partial class Verifier +{ + static InnerVerifier GetVerifier(VerifySettings settings, string sourceFile, bool useUniqueDirectory) + { + var testContext = TestContext.Current; + var testContextTestMethod = testContext.TestMethod; + if (testContextTestMethod == null) + { + throw new("TestContext.TestMethod is null"); + } + + var testMethod = (XunitTestMethod) testContextTestMethod; + + var method = testMethod.Method; + + if (useUniqueDirectory) + { + settings.UseUniqueDirectory(); + } + + var type = method.ReflectedType!; + VerifierSettings.AssignTargetAssembly(type.Assembly); + + var methodParameters = method.ParameterNames(); + + var pathInfo = GetPathInfo(sourceFile, type, method); + return new( + sourceFile, + settings, + type.NameWithParent(), + method.Name, + methodParameters, + pathInfo); + } + + [Pure] + public static SettingsTask Verify( + object? target, + IEnumerable rawTargets, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify( + settings, + sourceFile, + _ => _.Verify(target, rawTargets)); + + [Pure] + public static SettingsTask Verify( + IEnumerable targets, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify( + settings, + sourceFile, + _ => _.Verify(targets)); + + [Pure] + public static SettingsTask Verify( + Target target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify( + settings, + sourceFile, + _ => _.Verify(target)); + + static SettingsTask Verify( + VerifySettings? settings, + string sourceFile, + Func> verify, + bool useUniqueDirectory = false) + { + Guards.AgainstBadSourceFile(sourceFile); + return new( + settings, + async settings => + { + using var verifier = GetVerifier(settings, sourceFile, useUniqueDirectory); + return await verify(verifier); + }); + } +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Archive.cs b/src/Verify.XunitV3/Verifier_Archive.cs new file mode 100644 index 0000000000..d3bc3b57ca --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Archive.cs @@ -0,0 +1,45 @@ +using System.IO.Compression; + +namespace VerifyXunit; + +public static partial class Verifier +{ + /// + /// Verifies the contents of a + /// + [Pure] + public static SettingsTask Verify( + ZipArchive archive, + Func? include = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyZip(archive, include, info, fileScrubber), true); + + /// + /// Verifies the contents of a + /// + [Pure] + public static SettingsTask VerifyZip( + string path, + Func? include = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyZip(path, include, info, fileScrubber), true); + + /// + /// Verifies the contents of a + /// + [Pure] + public static SettingsTask VerifyZip( + Stream stream, + Func? include = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyZip(stream, include, info, fileScrubber), true); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Directory.cs b/src/Verify.XunitV3/Verifier_Directory.cs new file mode 100644 index 0000000000..622ab71241 --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Directory.cs @@ -0,0 +1,75 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ +#if NET6_0_OR_GREATER + + /// + /// Verifies the contents of . + /// + [Pure] + public static SettingsTask VerifyDirectory( + string path, + Func? include = null, + string? pattern = null, + EnumerationOptions? options = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyDirectory(path, include, pattern, options, info, fileScrubber), true); + + /// + /// Verifies the contents of . + /// Differs from passing to Verify(object? target) which will verify the full path. + /// + [Pure] + public static SettingsTask VerifyDirectory( + DirectoryInfo path, + Func? include = null, + string? pattern = null, + EnumerationOptions? options = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + VerifyDirectory(path.FullName, include, pattern, options, settings, info, fileScrubber, sourceFile); + +#else + /// + /// Verifies the contents of . + /// + [Pure] + public static SettingsTask VerifyDirectory( + string path, + Func? include = null, + string? pattern = null, + SearchOption option = SearchOption.AllDirectories, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + Verify( + settings, + sourceFile, + _ => _.VerifyDirectory(path, include, pattern, option, info, fileScrubber), + true); + + /// + /// Verifies the contents of . + /// Differs from passing to Verify(object? target) which will verify the full path. + /// + [Pure] + public static SettingsTask VerifyDirectory( + DirectoryInfo path, + Func? include = null, + string? pattern = null, + SearchOption option = SearchOption.AllDirectories, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null, + [CallerFilePath] string sourceFile = "") => + VerifyDirectory(path.FullName, include, pattern, option, settings, info, fileScrubber, sourceFile); + +#endif +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_File.cs b/src/Verify.XunitV3/Verifier_File.cs new file mode 100644 index 0000000000..2b622d86bb --- /dev/null +++ b/src/Verify.XunitV3/Verifier_File.cs @@ -0,0 +1,29 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + /// + /// Verifies the contents of . + /// + [Pure] + public static SettingsTask VerifyFile( + string path, + VerifySettings? settings = null, + object? info = null, + string? extension = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyFile(path, info, extension)); + + /// + /// Verifies the contents of . + /// Differs from passing to Verify(object? target) which will verify the full path. + /// + [Pure] + public static SettingsTask VerifyFile( + FileInfo path, + VerifySettings? settings = null, + object? info = null, + string? extension = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyFile(path, info, extension)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Json.cs b/src/Verify.XunitV3/Verifier_Json.cs new file mode 100644 index 0000000000..09697dc5fd --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Json.cs @@ -0,0 +1,49 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask VerifyJson( + [StringSyntax(StringSyntaxAttribute.Json)] + string? target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyJson(target)); + + [Pure] + public static SettingsTask VerifyJson( + [StringSyntax(StringSyntaxAttribute.Json)] + Task target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyJson(target)); + + [Pure] + public static SettingsTask VerifyJson( + [StringSyntax(StringSyntaxAttribute.Json)] + ValueTask target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyJson(target)); + + [Pure] + public static SettingsTask VerifyJson( + Stream? target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyJson(target)); + + [Pure] + public static SettingsTask VerifyJson( + Task target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyJson(target)); + + [Pure] + public static SettingsTask VerifyJson( + ValueTask target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyJson(target)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Object.cs b/src/Verify.XunitV3/Verifier_Object.cs new file mode 100644 index 0000000000..59b6353f8b --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Object.cs @@ -0,0 +1,45 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask Verify( + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Verify()); + + [Pure] + public static SettingsTask Verify( + Func> target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Verify(target())); + + [Pure] + public static SettingsTask Verify( + Task target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Verify(target)); + + [Pure] + public static SettingsTask Verify( + ValueTask target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Verify(target)); + + [Pure] + public static SettingsTask Verify( + IAsyncEnumerable target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Verify(target)); + + [Pure] + public static SettingsTask Verify( + object? target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Verify(target)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Stream.cs b/src/Verify.XunitV3/Verifier_Stream.cs new file mode 100644 index 0000000000..798ee91f7c --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Stream.cs @@ -0,0 +1,94 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask Verify( + FileStream? target, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, info)); + + [Pure] + public static SettingsTask Verify( + Stream? target, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, info)); + + [Pure] + public static SettingsTask Verify( + Stream? target, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, extension, info)); + + [Pure] + public static SettingsTask Verify( + Task target, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") + where T : Stream => + Verify(settings, sourceFile, _ => _.VerifyStream(target, extension, info)); + + [Pure] + public static SettingsTask Verify( + ValueTask target, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") + where T : Stream => + Verify(settings, sourceFile, _ => _.VerifyStream(target, extension, info)); + + [Pure] + public static SettingsTask Verify( + IEnumerable targets, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") + where T : Stream => + Verify(settings, sourceFile, _ => _.VerifyStreams(targets, extension, info)); + + [Pure] + public static SettingsTask Verify( + byte[]? target, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, extension, info)); + + [Pure] + public static SettingsTask Verify( + byte[]? target, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, info)); + + [Pure] + public static SettingsTask Verify( + Task target, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, extension, info)); + + [Pure] + public static SettingsTask Verify( + ValueTask target, + string extension, + VerifySettings? settings = null, + object? info = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyStream(target, extension, info)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_String.cs b/src/Verify.XunitV3/Verifier_String.cs new file mode 100644 index 0000000000..b142fc4699 --- /dev/null +++ b/src/Verify.XunitV3/Verifier_String.cs @@ -0,0 +1,34 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask Verify( + string? target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyString(target)); + + [Pure] + public static SettingsTask Verify( + Task target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyString(target)); + + [Pure] + public static SettingsTask Verify( + string? target, + string extension, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyString(target, extension)); + + [Pure] + public static SettingsTask Verify( + Task target, + string extension, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyString(target, extension)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Throws.cs b/src/Verify.XunitV3/Verifier_Throws.cs new file mode 100644 index 0000000000..a6e69559b7 --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Throws.cs @@ -0,0 +1,46 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask Throws( + Action target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Throws(target)); + + [Pure] + public static SettingsTask Throws( + Func target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.Throws(target)); + + [Pure] + public static SettingsTask ThrowsTask( + Func target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.ThrowsTask(target)); + + [Pure] + public static SettingsTask ThrowsTask( + Func> target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.ThrowsTask(target)); + + [Pure] + public static SettingsTask ThrowsValueTask( + Func target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.ThrowsValueTask(target)); + + [Pure] + public static SettingsTask ThrowsValueTask( + Func> target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.ThrowsValueTask(target)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Tuple.cs b/src/Verify.XunitV3/Verifier_Tuple.cs new file mode 100644 index 0000000000..e9c9a02c9e --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Tuple.cs @@ -0,0 +1,11 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask VerifyTuple( + Expression> expression, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyTuple(expression)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verifier_Xml.cs b/src/Verify.XunitV3/Verifier_Xml.cs new file mode 100644 index 0000000000..1f3c86a1f2 --- /dev/null +++ b/src/Verify.XunitV3/Verifier_Xml.cs @@ -0,0 +1,49 @@ +namespace VerifyXunit; + +public static partial class Verifier +{ + [Pure] + public static SettingsTask VerifyXml( + [StringSyntax(StringSyntaxAttribute.Xml)] + string? target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyXml(target)); + + [Pure] + public static SettingsTask VerifyXml( + [StringSyntax(StringSyntaxAttribute.Xml)] + Task target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyXml(target)); + + [Pure] + public static SettingsTask VerifyXml( + [StringSyntax(StringSyntaxAttribute.Xml)] + ValueTask target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyXml(target)); + + [Pure] + public static SettingsTask VerifyXml( + Stream? target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyXml(target)); + + [Pure] + public static SettingsTask VerifyXml( + Task target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyXml(target)); + + [Pure] + public static SettingsTask VerifyXml( + ValueTask target, + VerifySettings? settings = null, + [CallerFilePath] string sourceFile = "") => + Verify(settings, sourceFile, _ => _.VerifyXml(target)); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/Verify.XunitV3.csproj b/src/Verify.XunitV3/Verify.XunitV3.csproj new file mode 100644 index 0000000000..5662a86018 --- /dev/null +++ b/src/Verify.XunitV3/Verify.XunitV3.csproj @@ -0,0 +1,23 @@ + + + + net472;net48 + $(TargetFrameworks);net6.0;net7.0;net8.0;net9.0 + $(Version)-beta.1 + + + + + + + + + + + + + + + + + diff --git a/src/Verify.XunitV3/VerifyBase.cs b/src/Verify.XunitV3/VerifyBase.cs new file mode 100644 index 0000000000..b01f288e30 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase.cs @@ -0,0 +1,31 @@ +namespace VerifyXunit; + +public abstract partial class VerifyBase +{ + VerifySettings? settings; + string sourceFile; + + public VerifyBase(VerifySettings? settings = null, [CallerFilePath] string sourceFile = "") + { + if (string.IsNullOrWhiteSpace(sourceFile)) + { + throw new($"{nameof(VerifyBase)}.ctor must be called explicitly."); + } + + this.settings = settings; + this.sourceFile = sourceFile; + } + + [Pure] + public SettingsTask Verify( + object? target, + IEnumerable rawTargets, + VerifySettings? settings = null) => + Verifier.Verify(target, rawTargets, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + IEnumerable targets, + VerifySettings? settings = null) => + Verifier.Verify(targets, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Archive.cs b/src/Verify.XunitV3/VerifyBase_Archive.cs new file mode 100644 index 0000000000..595d837aa9 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Archive.cs @@ -0,0 +1,60 @@ +using System.IO.Compression; + +namespace VerifyXunit; + +public partial class VerifyBase +{ + /// + /// Verifies the contents of a + /// + [Pure] + public SettingsTask Verify( + ZipArchive archive, + Func? include = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.Verify( + archive, + include, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); + + /// + /// Verifies the contents of a + /// + [Pure] + public SettingsTask VerifyZip( + string path, + Func? include = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.VerifyZip( + path, + include, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); + + /// + /// Verifies the contents of a + /// + [Pure] + public SettingsTask VerifyZip( + Stream stream, + Func? include = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.VerifyZip( + stream, + include, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Directory.cs b/src/Verify.XunitV3/VerifyBase_Directory.cs new file mode 100644 index 0000000000..d5fa8aa95b --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Directory.cs @@ -0,0 +1,99 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ +#if NET6_0_OR_GREATER + + /// + /// Verifies the contents of . + /// + [Pure] + public SettingsTask VerifyDirectory( + string path, + Func? include = null, + string? pattern = null, + EnumerationOptions? options = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.VerifyDirectory( + path, + include, + pattern, + options, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); + + /// + /// Verifies the contents of . + /// Differs from passing to Verify(object? target) which will verify the full path. + /// + [Pure] + public SettingsTask VerifyDirectory( + DirectoryInfo path, + Func? include = null, + string? pattern = null, + EnumerationOptions? options = null, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.VerifyDirectory( + path.FullName, + include, + pattern, + options, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); + +#else + /// + /// Verifies the contents of . + /// + [Pure] + public SettingsTask VerifyDirectory( + string path, + Func? include = null, + string? pattern = null, + SearchOption option = SearchOption.AllDirectories, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.VerifyDirectory( + path, + include, + pattern, + option, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); + + /// + /// Verifies the contents of . + /// Differs from passing to Verify(object? target) which will verify the full path. + /// + [Pure] + public SettingsTask VerifyDirectory( + DirectoryInfo path, + Func? include = null, + string? pattern = null, + SearchOption option = SearchOption.AllDirectories, + VerifySettings? settings = null, + object? info = null, + FileScrubber? fileScrubber = null) => + Verifier.VerifyDirectory( + path.FullName, + include, + pattern, + option, + settings ?? this.settings, + info, + fileScrubber, + sourceFile); + +#endif +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_File.cs b/src/Verify.XunitV3/VerifyBase_File.cs new file mode 100644 index 0000000000..7cc11f3f77 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_File.cs @@ -0,0 +1,25 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + /// + /// Verifies the contents of . + /// + [Pure] + public SettingsTask VerifyFile( + string path, + VerifySettings? settings = null, + object? info = null) => + Verifier.VerifyFile(path, settings ?? this.settings, info, null, sourceFile); + + /// + /// Verifies the contents of . + /// Differs from passing to Verify(object? target) which will verify the full path. + /// + [Pure] + public SettingsTask VerifyFile( + FileInfo path, + VerifySettings? settings = null, + object? info = null) => + Verifier.VerifyFile(path, settings ?? this.settings, info, null, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Json.cs b/src/Verify.XunitV3/VerifyBase_Json.cs new file mode 100644 index 0000000000..db56d85186 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Json.cs @@ -0,0 +1,43 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask VerifyJson( + [StringSyntax(StringSyntaxAttribute.Json)] + string? target, + VerifySettings? settings = null) => + Verifier.VerifyJson(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyJson( + [StringSyntax(StringSyntaxAttribute.Json)] + Task target, + VerifySettings? settings = null) => + Verifier.VerifyJson(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyJson( + [StringSyntax(StringSyntaxAttribute.Json)] + ValueTask target, + VerifySettings? settings = null) => + Verifier.VerifyJson(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyJson( + Stream? target, + VerifySettings? settings = null) => + Verifier.VerifyJson(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyJson( + Task target, + VerifySettings? settings = null) => + Verifier.VerifyJson(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyJson( + ValueTask target, + VerifySettings? settings = null) => + Verifier.VerifyJson(target, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Object.cs b/src/Verify.XunitV3/VerifyBase_Object.cs new file mode 100644 index 0000000000..68fcd56605 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Object.cs @@ -0,0 +1,38 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask Verify( + Func> target, + VerifySettings? settings = null) + where T : notnull => + Verifier.Verify(target(), settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + Task target, + VerifySettings? settings = null) + where T : notnull => + Verifier.Verify(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + ValueTask target, + VerifySettings? settings = null) + where T : notnull => + Verifier.Verify(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + IAsyncEnumerable target, + VerifySettings? settings = null) + where T : notnull => + Verifier.Verify(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + object? target, + VerifySettings? settings = null) => + Verifier.Verify(target, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Stream.cs b/src/Verify.XunitV3/VerifyBase_Stream.cs new file mode 100644 index 0000000000..e8ef0e047e --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Stream.cs @@ -0,0 +1,84 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask Verify( + FileStream? target, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + Stream? target, + string extension, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, extension, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + Stream? target, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + Task target, + string extension, + VerifySettings? settings = null, + object? info = null) + where T : Stream => + Verifier.Verify(target, extension, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + ValueTask target, + string extension, + VerifySettings? settings = null, + object? info = null) + where T : Stream => + Verifier.Verify(target, extension, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + IEnumerable targets, + string extension, + VerifySettings? settings = null, + object? info = null) + where T : Stream => + Verifier.Verify(targets, extension, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + byte[]? target, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + byte[]? target, + string extension, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, extension, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + Task target, + string extension, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, extension, settings ?? this.settings, info, sourceFile); + + [Pure] + public SettingsTask Verify( + ValueTask target, + string extension, + VerifySettings? settings = null, + object? info = null) => + Verifier.Verify(target, extension, settings ?? this.settings, info, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_String.cs b/src/Verify.XunitV3/VerifyBase_String.cs new file mode 100644 index 0000000000..536315afb4 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_String.cs @@ -0,0 +1,30 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask Verify( + string? target, + VerifySettings? settings = null) => + Verifier.Verify(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + Task target, + VerifySettings? settings = null) => + Verifier.Verify(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + string? target, + string extension, + VerifySettings? settings = null) => + Verifier.Verify(target, extension, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Verify( + Task target, + string extension, + VerifySettings? settings = null) => + Verifier.Verify(target, extension, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Throws.cs b/src/Verify.XunitV3/VerifyBase_Throws.cs new file mode 100644 index 0000000000..a24794128c --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Throws.cs @@ -0,0 +1,28 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask Throws( + Action target, + VerifySettings? settings = null) => + Verifier.Throws(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Throws( + Func target, + VerifySettings? settings = null) => + Verifier.Throws(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Throws( + Func target, + VerifySettings? settings = null) => + Verifier.ThrowsTask(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask Throws( + Func target, + VerifySettings? settings = null) => + Verifier.ThrowsValueTask(target, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Tuple.cs b/src/Verify.XunitV3/VerifyBase_Tuple.cs new file mode 100644 index 0000000000..ce2554dd1b --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Tuple.cs @@ -0,0 +1,10 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask VerifyTuple( + Expression> target, + VerifySettings? settings = null) => + Verifier.VerifyTuple(target, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/VerifyBase_Xml.cs b/src/Verify.XunitV3/VerifyBase_Xml.cs new file mode 100644 index 0000000000..4ef9a0bb55 --- /dev/null +++ b/src/Verify.XunitV3/VerifyBase_Xml.cs @@ -0,0 +1,43 @@ +namespace VerifyXunit; + +public partial class VerifyBase +{ + [Pure] + public SettingsTask VerifyXml( + [StringSyntax(StringSyntaxAttribute.Xml)] + string? target, + VerifySettings? settings = null) => + Verifier.VerifyXml(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyXml( + [StringSyntax(StringSyntaxAttribute.Xml)] + Task target, + VerifySettings? settings = null) => + Verifier.VerifyXml(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyXml( + [StringSyntax(StringSyntaxAttribute.Xml)] + ValueTask target, + VerifySettings? settings = null) => + Verifier.VerifyXml(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyXml( + Stream? target, + VerifySettings? settings = null) => + Verifier.VerifyXml(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyXml( + Task target, + VerifySettings? settings = null) => + Verifier.VerifyXml(target, settings ?? this.settings, sourceFile); + + [Pure] + public SettingsTask VerifyXml( + ValueTask target, + VerifySettings? settings = null) => + Verifier.VerifyXml(target, settings ?? this.settings, sourceFile); +} \ No newline at end of file diff --git a/src/Verify.XunitV3/buildTransitive/Verify.XunitV3.props b/src/Verify.XunitV3/buildTransitive/Verify.XunitV3.props new file mode 100644 index 0000000000..d2af283e3f --- /dev/null +++ b/src/Verify.XunitV3/buildTransitive/Verify.XunitV3.props @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Verify.sln b/src/Verify.sln index ba6f619aef..14506cabfe 100644 --- a/src/Verify.sln +++ b/src/Verify.sln @@ -87,6 +87,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Verify.MSTest.SourceGenerat EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Verify.MSTest.SourceGenerator.Tests", "Verify.MSTest.SourceGenerator.Tests\Verify.MSTest.SourceGenerator.Tests.csproj", "{8CAE91EB-725B-4F4A-AA70-F825395E944A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Verify.XunitV3", "Verify.XunitV3\Verify.XunitV3.csproj", "{287D264D-3E86-4B52-BA94-B30C17904001}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Verify.XunitV3.Tests", "Verify.XunitV3.Tests\Verify.XunitV3.Tests.csproj", "{1FC58494-3CB3-432C-B268-40FA4FF02E08}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -229,6 +233,14 @@ Global {8CAE91EB-725B-4F4A-AA70-F825395E944A}.Debug|Any CPU.Build.0 = Debug|Any CPU {8CAE91EB-725B-4F4A-AA70-F825395E944A}.Release|Any CPU.ActiveCfg = Release|Any CPU {8CAE91EB-725B-4F4A-AA70-F825395E944A}.Release|Any CPU.Build.0 = Release|Any CPU + {287D264D-3E86-4B52-BA94-B30C17904001}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {287D264D-3E86-4B52-BA94-B30C17904001}.Debug|Any CPU.Build.0 = Debug|Any CPU + {287D264D-3E86-4B52-BA94-B30C17904001}.Release|Any CPU.ActiveCfg = Release|Any CPU + {287D264D-3E86-4B52-BA94-B30C17904001}.Release|Any CPU.Build.0 = Release|Any CPU + {1FC58494-3CB3-432C-B268-40FA4FF02E08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FC58494-3CB3-432C-B268-40FA4FF02E08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FC58494-3CB3-432C-B268-40FA4FF02E08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FC58494-3CB3-432C-B268-40FA4FF02E08}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Verify/InternalsVisibleTo.cs b/src/Verify/InternalsVisibleTo.cs index 9e8a6b2ab3..dd2b2c66b7 100644 --- a/src/Verify/InternalsVisibleTo.cs +++ b/src/Verify/InternalsVisibleTo.cs @@ -3,6 +3,8 @@ [assembly: InternalsVisibleTo("Verify.MSTest.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] [assembly: InternalsVisibleTo("Verify.Xunit, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] [assembly: InternalsVisibleTo("Verify.Xunit.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] +[assembly: InternalsVisibleTo("Verify.XunitV3, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] +[assembly: InternalsVisibleTo("Verify.XunitV3.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] [assembly: InternalsVisibleTo("Verify.NUnit, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] [assembly: InternalsVisibleTo("Verify.NUnit.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] [assembly: InternalsVisibleTo("StrictJsonTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001000f0a8e4bf1639dce01be6592384e7dfc621915b7759fb5cee42ec5d351bcc43460432da1659ee618ca6cab6b8b8e56a5deb5d4ee1a49783d5c2690752502d31ccbfee9b2c697e20359b55ad100cc9370c8e983fd9496f01d761a060d0435bac7243b1832ba95757aa5adbb67df38c213d717b6751e1217cea9fa5c61e9b799dd")] diff --git a/src/VerifyXunitV3.slnf b/src/VerifyXunitV3.slnf new file mode 100644 index 0000000000..003393883f --- /dev/null +++ b/src/VerifyXunitV3.slnf @@ -0,0 +1,10 @@ +{ + "solution": { + "path": "Verify.sln", + "projects": [ + "Verify.XunitV3.Tests\\Verify.XunitV3.Tests.csproj", + "Verify.XunitV3\\Verify.XunitV3.csproj", + "Verify\\Verify.csproj" + ] + } +} \ No newline at end of file diff --git a/src/appveyor.yml b/src/appveyor.yml index 228e23c484..0f2371634a 100644 --- a/src/appveyor.yml +++ b/src/appveyor.yml @@ -41,6 +41,8 @@ build_script: dotnet test src/Verify.Tests --configuration Release --no-build --no-restore --verbosity quiet dotnet test src/Verify.Xunit.DerivePaths.Tests --configuration Release --no-build --no-restore --verbosity quiet dotnet test src/Verify.Xunit.Tests --configuration Release --no-build --no-restore --verbosity quiet + dotnet test src/Verify.XunitV3.Tests --configuration Release --no-build --no-restore --verbosity quiet + dotnet test src/Verify.XunitV3.DerivePaths.Tests --configuration Release --no-build --no-restore --verbosity quiet if ($isWindows) { vstest.console src/Verify.MSTest.DerivePaths.Tests/bin/Release/net9.0/Verify.MSTest.DerivePaths.Tests.dll /logger:Appveyor vstest.console src/Verify.MSTest.Tests/bin/Release/net48/Verify.MSTest.Tests.dll /logger:Appveyor