diff --git a/docs/combinations.md b/docs/combinations.md index f068a7c8e..f666c5351 100644 --- a/docs/combinations.md +++ b/docs/combinations.md @@ -5,9 +5,9 @@ Source File: /docs/mdsource/combinations.source.md To change this file edit the source file and then run MarkdownSnippets. --> -# VerifyCombinations +# Combinations -VerifyCombinations allows all combinations of the given input lists to be executed, and the results all written to a single file. +Combinations allows all combinations of the given input lists to be executed, and the results all written to a single file. ## Example @@ -25,7 +25,7 @@ public static string BuildAddress(int streetNumber, string street, string city) return $"{streetNumber} {street}, {city}"; } ``` -snippet source | anchor +snippet source | anchor @@ -48,14 +48,14 @@ public Task BuildAddressTest() cities); } ``` -snippet source | anchor +snippet source | anchor ### Result - - + + ```txt { 1, Smith St , Sydney : 1 Smith St, Sydney, @@ -68,7 +68,7 @@ public Task BuildAddressTest() 10, Wallace St, Chicago: 10 Wallace St, Chicago } ``` -snippet source | anchor +snippet source | anchor @@ -106,14 +106,14 @@ public Task BuildAddressExceptionsTest() ); } ``` -snippet source | anchor +snippet source | anchor ### Result - - + + ```txt { -1, , null : ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street')., @@ -136,7 +136,7 @@ public Task BuildAddressExceptionsTest() 10, Valid St, Valid City: 10 Valid St, Valid City } ``` -snippet source | anchor +snippet source | anchor @@ -151,7 +151,7 @@ Exception capture can be enabled globally: public static void Initialize() => CombinationSettings.CaptureExceptions(); ``` -snippet source | anchor +snippet source | anchor If exception capture has been enabled globally, it can be disable at the method test level using `captureExceptions: false`. @@ -173,7 +173,7 @@ public Task BuildAddressExceptionsDisabledTest() cities); } ``` -snippet source | anchor +snippet source | anchor @@ -335,7 +335,7 @@ class CustomCombinationConverter : string.Join(", ", keys.Select(_ => _.Value)); } ``` -snippet source | anchor +snippet source | anchor Full control of serialization can be achieved by inheriting from `WriteOnlyJsonConverter`. @@ -354,14 +354,14 @@ static CustomCombinationConverter customConverter = new(); public static void Init() => VerifierSettings.AddExtraSettings(_ => _.Converters.Insert(0, customConverter)); ``` -snippet source | anchor +snippet source | anchor #### Result - - + + ```txt { 1, Smith St, Sydney: 1 Smith St, Sydney, @@ -374,5 +374,5 @@ public static void Init() => 10, Wallace St, Chicago: 10 Wallace St, Chicago } ``` -snippet source | anchor +snippet source | anchor diff --git a/docs/mdsource/combinations.source.md b/docs/mdsource/combinations.source.md index c4bf8ff1c..a69db4b20 100644 --- a/docs/mdsource/combinations.source.md +++ b/docs/mdsource/combinations.source.md @@ -1,6 +1,6 @@ -# VerifyCombinations +# Combinations -VerifyCombinations allows all combinations of the given input lists to be executed, and the results all written to a single file. +Combinations allows all combinations of the given input lists to be executed, and the results all written to a single file. ## Example @@ -16,7 +16,7 @@ snippet: CombinationSample ### Result -snippet: CombinationsSample.BuildAddressTest.verified.txt +snippet: CombinationSample.BuildAddressTest.verified.txt ## Column Alignment @@ -40,7 +40,7 @@ snippet: CombinationSample_CaptureExceptions ### Result -snippet: CombinationsSample.BuildAddressExceptionsTest.verified.txt +snippet: CombinationSample.BuildAddressExceptionsTest.verified.txt ### Global CaptureExceptions @@ -86,4 +86,4 @@ snippet: CombinationSample_CustomSerializationModuleInitializer #### Result -snippet: CombinationsTests.Combination_CustomSerialization.verified.txt \ No newline at end of file +snippet: CombinationTests.Combination_CustomSerialization.verified.txt \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md index 6c5ccecc0..5fff2e19b 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -20,7 +20,7 @@ To change this file edit the source file and then run MarkdownSnippets. * [File naming](/docs/naming.md) * [AppendFile](/docs/append-file.md) * [Parameterised tests](/docs/parameterised.md) - * [VerifyCombinations](/docs/combinations.md) + * [Combinations](/docs/combinations.md) * [Named Tuples](/docs/named-tuples.md) * [Scrubbers](/docs/scrubbers.md) * [Diff Engine](https://github.com/VerifyTests/DiffEngine) diff --git a/readme.md b/readme.md index 55395b71d..6cd8cb2ec 100644 --- a/readme.md +++ b/readme.md @@ -998,7 +998,7 @@ information sources and warn about particular gotchas: * [File naming](/docs/naming.md) * [AppendFile](/docs/append-file.md) * [Parameterised tests](/docs/parameterised.md) - * [VerifyCombinations](/docs/combinations.md) + * [Combinations](/docs/combinations.md) * [Named Tuples](/docs/named-tuples.md) * [Scrubbers](/docs/scrubbers.md) * [Diff Engine](https://github.com/VerifyTests/DiffEngine) diff --git a/src/StaticSettingsTests/CombinationsTests.BuildAddressExceptionsDisabledTest.verified.txt b/src/StaticSettingsTests/CombinationTests.BuildAddressExceptionsDisabledTest.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.BuildAddressExceptionsDisabledTest.verified.txt rename to src/StaticSettingsTests/CombinationTests.BuildAddressExceptionsDisabledTest.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.CallbackResults.verified.txt b/src/StaticSettingsTests/CombinationTests.CallbackResults.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.CallbackResults.verified.txt rename to src/StaticSettingsTests/CombinationTests.CallbackResults.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.CallbacksTest.verified.txt b/src/StaticSettingsTests/CombinationTests.CallbacksTest.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.CallbacksTest.verified.txt rename to src/StaticSettingsTests/CombinationTests.CallbacksTest.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.Combination_CustomSerialization.verified.txt b/src/StaticSettingsTests/CombinationTests.Combination_CustomSerialization.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.Combination_CustomSerialization.verified.txt rename to src/StaticSettingsTests/CombinationTests.Combination_CustomSerialization.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.Defaults.verified.txt b/src/StaticSettingsTests/CombinationTests.Defaults.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.Defaults.verified.txt rename to src/StaticSettingsTests/CombinationTests.Defaults.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.ExceptionCallbackResults.verified.txt b/src/StaticSettingsTests/CombinationTests.ExceptionCallbackResults.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.ExceptionCallbackResults.verified.txt rename to src/StaticSettingsTests/CombinationTests.ExceptionCallbackResults.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.ExceptionCallbacksTest.verified.txt b/src/StaticSettingsTests/CombinationTests.ExceptionCallbacksTest.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.ExceptionCallbacksTest.verified.txt rename to src/StaticSettingsTests/CombinationTests.ExceptionCallbacksTest.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.WithCaptureExceptions.verified.txt b/src/StaticSettingsTests/CombinationTests.WithCaptureExceptions.verified.txt similarity index 100% rename from src/StaticSettingsTests/CombinationsTests.WithCaptureExceptions.verified.txt rename to src/StaticSettingsTests/CombinationTests.WithCaptureExceptions.verified.txt diff --git a/src/StaticSettingsTests/CombinationsTests.cs b/src/StaticSettingsTests/CombinationTests.cs similarity index 99% rename from src/StaticSettingsTests/CombinationsTests.cs rename to src/StaticSettingsTests/CombinationTests.cs index be6e3faa9..0fdc019d6 100644 --- a/src/StaticSettingsTests/CombinationsTests.cs +++ b/src/StaticSettingsTests/CombinationTests.cs @@ -1,4 +1,4 @@ -public class CombinationsTests +public class CombinationTests { #region GlobalCaptureExceptions diff --git a/src/Verify.ApprovalTestsTransition/CombinationApprovals.cs b/src/Verify.ApprovalTestsTransition/CombinationApprovals.cs index d703cac58..cee815a6c 100644 --- a/src/Verify.ApprovalTestsTransition/CombinationApprovals.cs +++ b/src/Verify.ApprovalTestsTransition/CombinationApprovals.cs @@ -1,4 +1,4 @@ namespace ApprovalTests.Combinations; -[Obsolete("Use Verifier.VerifyCombinations", true)] +[Obsolete("Use Combinations().Verify(): https://github.com/VerifyTests/Verify/blob/main/docs/combinations.md", true)] public static class CombinationApprovals; \ No newline at end of file diff --git a/src/Verify.NUnit.Tests/CombinationsTests.KeysWithInvalidPathChars.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.KeysWithInvalidPathChars.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.KeysWithInvalidPathChars.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.KeysWithInvalidPathChars.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.MixedLengths.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.MixedLengths.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.MixedLengths.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.MixedLengths.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.One.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.One.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.One.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.One.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.Three.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.Three.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.Three.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.Three.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.Two.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.Two.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.Two.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.Two.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.WithDontScrub.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.WithDontScrub.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.WithDontScrub.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.WithDontScrub.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.WithException.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.WithException.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.WithException.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.WithException.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.WithScrubbed.verified.txt b/src/Verify.Fixie.Tests/CombinationTests.WithScrubbed.verified.txt similarity index 100% rename from src/Verify.NUnit.Tests/CombinationsTests.WithScrubbed.verified.txt rename to src/Verify.Fixie.Tests/CombinationTests.WithScrubbed.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.KeysWithInvalidPathChars.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.KeysWithInvalidPathChars.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.KeysWithInvalidPathChars.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.KeysWithInvalidPathChars.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.MixedLengths.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.MixedLengths.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.MixedLengths.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.MixedLengths.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.One.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.One.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.One.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.One.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.Three.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.Three.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.Three.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.Three.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.Two.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.Two.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.Two.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.Two.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.WithDontScrub.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.WithDontScrub.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.WithDontScrub.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.WithDontScrub.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.WithException.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.WithException.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.WithException.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.WithException.verified.txt diff --git a/src/Verify.TUnit.Tests/CombinationsTests.WithScrubbed.verified.txt b/src/Verify.NUnit.Tests/CombinationTests.WithScrubbed.verified.txt similarity index 100% rename from src/Verify.TUnit.Tests/CombinationsTests.WithScrubbed.verified.txt rename to src/Verify.NUnit.Tests/CombinationTests.WithScrubbed.verified.txt diff --git a/src/Verify.NUnit.Tests/CombinationsTests.cs b/src/Verify.NUnit.Tests/CombinationTests.cs similarity index 98% rename from src/Verify.NUnit.Tests/CombinationsTests.cs rename to src/Verify.NUnit.Tests/CombinationTests.cs index 9af4ce1e0..3bc4e43e3 100644 --- a/src/Verify.NUnit.Tests/CombinationsTests.cs +++ b/src/Verify.NUnit.Tests/CombinationTests.cs @@ -1,5 +1,5 @@ [TestFixture] -public class CombinationsTests +public class CombinationTests { [Test] public Task One() diff --git a/src/Verify.TUnit.Tests/CombinationsTests.cs b/src/Verify.TUnit.Tests/CombinationTests.cs similarity index 98% rename from src/Verify.TUnit.Tests/CombinationsTests.cs rename to src/Verify.TUnit.Tests/CombinationTests.cs index 11812eedc..660f68e74 100644 --- a/src/Verify.TUnit.Tests/CombinationsTests.cs +++ b/src/Verify.TUnit.Tests/CombinationTests.cs @@ -1,4 +1,4 @@ -public class CombinationsTests +public class CombinationTests { [Test] public Task One() diff --git a/src/Verify.Tests/CombinationsSample.BuildAddressExceptionsTest.verified.txt b/src/Verify.Tests/CombinationSample.BuildAddressExceptionsTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsSample.BuildAddressExceptionsTest.verified.txt rename to src/Verify.Tests/CombinationSample.BuildAddressExceptionsTest.verified.txt diff --git a/src/Verify.Tests/CombinationsSample.BuildAddressTest.verified.txt b/src/Verify.Tests/CombinationSample.BuildAddressTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsSample.BuildAddressTest.verified.txt rename to src/Verify.Tests/CombinationSample.BuildAddressTest.verified.txt diff --git a/src/Verify.Tests/CombinationsSample.CombinationAlignment.verified.txt b/src/Verify.Tests/CombinationSample.CombinationAlignment.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsSample.CombinationAlignment.verified.txt rename to src/Verify.Tests/CombinationSample.CombinationAlignment.verified.txt diff --git a/src/Verify.Tests/CombinationsSample.cs b/src/Verify.Tests/CombinationSample.cs similarity index 98% rename from src/Verify.Tests/CombinationsSample.cs rename to src/Verify.Tests/CombinationSample.cs index db1e20673..4fe9bfeae 100644 --- a/src/Verify.Tests/CombinationsSample.cs +++ b/src/Verify.Tests/CombinationSample.cs @@ -1,6 +1,6 @@ // ReSharper disable MemberCanBePrivate.Global #if NET8_0_OR_GREATER -public class CombinationsSample +public class CombinationSample { #region CombinationTargetMethod diff --git a/src/Verify.Tests/CombinationsTests.AsyncEnumerableTest.verified.txt b/src/Verify.Tests/CombinationTests.AsyncEnumerableTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsTests.AsyncEnumerableTest.verified.txt rename to src/Verify.Tests/CombinationTests.AsyncEnumerableTest.verified.txt diff --git a/src/Verify.Tests/CombinationsTests.EnumerableTest.verified.txt b/src/Verify.Tests/CombinationTests.EnumerableTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsTests.EnumerableTest.verified.txt rename to src/Verify.Tests/CombinationTests.EnumerableTest.verified.txt diff --git a/src/Verify.Tests/CombinationsTests.SimpleReturnTest.verified.txt b/src/Verify.Tests/CombinationTests.SimpleReturnTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsTests.SimpleReturnTest.verified.txt rename to src/Verify.Tests/CombinationTests.SimpleReturnTest.verified.txt diff --git a/src/Verify.Tests/CombinationsTests.TaskTest.verified.txt b/src/Verify.Tests/CombinationTests.TaskTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsTests.TaskTest.verified.txt rename to src/Verify.Tests/CombinationTests.TaskTest.verified.txt diff --git a/src/Verify.Tests/CombinationsTests.ValueTaskTest.verified.txt b/src/Verify.Tests/CombinationTests.ValueTaskTest.verified.txt similarity index 100% rename from src/Verify.Tests/CombinationsTests.ValueTaskTest.verified.txt rename to src/Verify.Tests/CombinationTests.ValueTaskTest.verified.txt diff --git a/src/Verify.Tests/CombinationsTests.cs b/src/Verify.Tests/CombinationTests.cs similarity index 98% rename from src/Verify.Tests/CombinationsTests.cs rename to src/Verify.Tests/CombinationTests.cs index da91d08ad..29c8c9d18 100644 --- a/src/Verify.Tests/CombinationsTests.cs +++ b/src/Verify.Tests/CombinationTests.cs @@ -1,5 +1,5 @@ // ReSharper disable MemberCanBePrivate.Global -public class CombinationsTests +public class CombinationTests { static int[] params1 = [1, 10]; static string[] params2 = ["Smith St", "Wallace St"];