diff --git a/src/Verify/Naming/ParameterSettings.cs b/src/Verify/Naming/ParameterSettings.cs index abda4b4a75..e6c052ea4e 100644 --- a/src/Verify/Naming/ParameterSettings.cs +++ b/src/Verify/Naming/ParameterSettings.cs @@ -18,21 +18,7 @@ public bool TryGetParameters([NotNullWhen(true)] out object?[]? parameters) public bool HasParameters => parameters != null; - /// - /// Define the parameter values being used by a parameterised (aka data driven) test. - /// - /// Scenarios: - /// - /// * Verify.Expecto: Does not currently support `UseParameters()`. - /// * Verify.Fixie: Automatically detects the method parameters via a custom ITestProject https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#fixie. - /// * Verify.MSTest: Does not detect the parametrised arguments, as such `UseParameters()` is required. - /// * Verify.NUnit: Automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters. - /// * Verify.Xunit: Does not detect the parametrised arguments, as such `UseParameters()` is required. - /// * Verify.XunitV3: Automatically detect the method parameters for built in types (string, int, bool etc), but for complex parameters `UseParameters()` is required. - /// - /// When this is not possible, an exception will be thrown instructing the use of - /// Not compatible with . - /// + /// public void UseParameters(T[] parameters) => UseParameters( new object?[] @@ -40,22 +26,7 @@ public void UseParameters(T[] parameters) => parameters }); - - /// - /// Define the parameter values being used by a parameterised (aka data driven) test. - /// - /// Scenarios: - /// - /// * Verify.Expecto: Does not currently support `UseParameters()`. - /// * Verify.Fixie: Automatically detects the method parameters via a custom ITestProject https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#fixie. - /// * Verify.MSTest: Does not detect the parametrised arguments, as such `UseParameters()` is required. - /// * Verify.NUnit: Automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters. - /// * Verify.Xunit: Does not detect the parametrised arguments, as such `UseParameters()` is required. - /// * Verify.XunitV3: Automatically detect the method parameters for built in types (string, int, bool etc), but for complex parameters `UseParameters()` is required. - /// - /// When this is not possible, an exception will be thrown instructing the use of - /// Not compatible with . - /// + /// public void UseParameters(T parameter) => UseParameters( new object?[] @@ -63,20 +34,21 @@ public void UseParameters(T parameter) => parameter }); - /// /// Define the parameter values being used by a parameterised (aka data driven) test. /// /// Scenarios: /// - /// * Verify.Expecto: Does not currently support `UseParameters()`. - /// * Verify.Fixie: Automatically detects the method parameters via a custom ITestProject https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#fixie. - /// * Verify.MSTest: Does not detect the parametrised arguments, as such `UseParameters()` is required. - /// * Verify.NUnit: Automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters. - /// * Verify.Xunit: Does not detect the parametrised arguments, as such `UseParameters()` is required. - /// * Verify.XunitV3: Automatically detect the method parameters for built in types (string, int, bool etc), but for complex parameters `UseParameters()` is required. + /// + /// Verify.Expecto: Does not currently support `UseParameters()`. + /// Verify.Fixie: Automatically detects the method parameters via a custom ITestProject https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#fixie. + /// Verify.MSTest: Does not detect the parametrised arguments, as such `UseParameters()` is required.. + /// Verify.NUnit: Automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters.. + /// Verify.Xunit: Does not detect the parametrised arguments, as such `UseParameters()` is required. + /// Verify.XunitV3: Automatically detect the method parameters for built in types (string, int, bool etc), but for complex types `UseParameters()` is required. + /// /// - /// When this is not possible, an exception will be thrown instructing the use of + /// In the scenarios where parameters are not automatically detected, an exception will be thrown instructing the potential need for /// Not compatible with . /// public void UseParameters(params object?[] parameters) diff --git a/src/Verify/SettingsTask.cs b/src/Verify/SettingsTask.cs index e001b3eb98..08eed06777 100644 --- a/src/Verify/SettingsTask.cs +++ b/src/Verify/SettingsTask.cs @@ -64,12 +64,7 @@ public SettingsTask IgnoreParametersForVerified(params object?[] parameters) return this; } - /// - /// Define the parameter values being used by a parameterised (aka data drive) test. - /// In most cases the parameter values can be automatically resolved. - /// When this is not possible, an exception will be thrown instructing the use of - /// Not compatible with . - /// + /// [Pure] public SettingsTask UseParameters(params object?[] parameters) { @@ -77,6 +72,7 @@ public SettingsTask UseParameters(params object?[] parameters) return this; } + /// [Pure] public SettingsTask UseParameters(T parameter) { @@ -84,6 +80,7 @@ public SettingsTask UseParameters(T parameter) return this; } + /// [Pure] public SettingsTask UseParameters(T[] parameters) {