Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Sep 4, 2024
1 parent 6032c96 commit 58ab3ef
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
19 changes: 11 additions & 8 deletions docs/mdsource/parameterised.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ Characters that cannot be used for a file name are replaced with a dash (`-`).

## UseParameters()

<b>
`UseParameters`() is used to control what parameters are used when naming files. The usage depends on the test framework being used:

* Verify.Expecto: Does not currently support `UseParameters()`.
* Verify.Fixie: Automatically detects the method parameters via a [custom ITestProject]( 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.
</b>

`UseParameters`() is used to control what parameters are used when naming files. The usual usage is to pass though all parameters (in the same order) that the test method accepts:

### Usage:

For the above scenarios where parameters are not automatically detected:

snippet: UseParameters

Expand All @@ -42,7 +45,7 @@ If the number of parameters passed to `UseParameters()` is greater than the numb

## NUnit

<b>`Verify.NUnit` automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters.</b>
`Verify.NUnit` automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters.


### TestCase
Expand All @@ -64,7 +67,7 @@ Produces:

## xUnit V2

<b>`Verify.Xunit` does not detect the parametrized arguments, as such `UseParameters()` is required.</b>
`Verify.Xunit` does not detect the parametrized arguments, as such `UseParameters()` is required.


### InlineData
Expand All @@ -88,7 +91,7 @@ snippet: xunitComplexMemberData

## xUnit V3

<b>`Verify.XunitV3` automatically detect the method parameters for built in types (string, int, bool etc), but for complex types `UseParameters()` is required.</b>
`Verify.XunitV3` automatically detect the method parameters for built in types (string, int, bool etc), but for complex types `UseParameters()` is required.


### InlineData
Expand All @@ -112,7 +115,7 @@ snippet: xunitV3ComplexMemberData

## Fixie

<b>Fixie has no build in test parameterisation. Test parameterisation need to be implemented by the consuming library. See [Attribute-Based Parameterization](https://github.com/fixie/fixie/wiki/Customizing-the-Test-Project-Lifecycle#recipe-attribute-based-parameterization) for an example.</b>
Fixie has no build in test parameterisation. Test parameterisation need to be implemented by the consuming library. See [Attribute-Based Parameterization](https://github.com/fixie/fixie/wiki/Customizing-the-Test-Project-Lifecycle#recipe-attribute-based-parameterization) for an example.

Verify.Fixie requires some customisation of the above example.

Expand All @@ -130,7 +133,7 @@ snippet: FixieTestCase

## MSTest

<b>`Verify.MSTest` does not detect the parametrized arguments, as such `UseParameters()` is required.</b>
`Verify.MSTest` does not detect the parametrized arguments, as such `UseParameters()` is required.


### DataRow
Expand Down
19 changes: 11 additions & 8 deletions docs/parameterised.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ Characters that cannot be used for a file name are replaced with a dash (`-`).

## UseParameters()

<b>
`UseParameters`() is used to control what parameters are used when naming files. The usage depends on the test framework being used:

* Verify.Expecto: Does not currently support `UseParameters()`.
* Verify.Fixie: Automatically detects the method parameters via a [custom ITestProject]( 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.
</b>

`UseParameters`() is used to control what parameters are used when naming files. The usual usage is to pass though all parameters (in the same order) that the test method accepts:

### Usage:

For the above scenarios where parameters are not automatically detected:

<!-- snippet: UseParameters -->
<a id='snippet-UseParameters'></a>
Expand Down Expand Up @@ -76,7 +79,7 @@ If the number of parameters passed to `UseParameters()` is greater than the numb

## NUnit

<b>`Verify.NUnit` automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters.</b>
`Verify.NUnit` automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters.


### TestCase
Expand Down Expand Up @@ -138,7 +141,7 @@ Produces:

## xUnit V2

<b>`Verify.Xunit` does not detect the parametrized arguments, as such `UseParameters()` is required.</b>
`Verify.Xunit` does not detect the parametrized arguments, as such `UseParameters()` is required.


### InlineData
Expand Down Expand Up @@ -310,7 +313,7 @@ public class ComplexParametersSample

## xUnit V3

<b>`Verify.XunitV3` automatically detect the method parameters for built in types (string, int, bool etc), but for complex types `UseParameters()` is required.</b>
`Verify.XunitV3` automatically detect the method parameters for built in types (string, int, bool etc), but for complex types `UseParameters()` is required.


### InlineData
Expand Down Expand Up @@ -461,7 +464,7 @@ public class ComplexParametersSample

## Fixie

<b>Fixie has no build in test parameterisation. Test parameterisation need to be implemented by the consuming library. See [Attribute-Based Parameterization](https://github.com/fixie/fixie/wiki/Customizing-the-Test-Project-Lifecycle#recipe-attribute-based-parameterization) for an example.</b>
Fixie has no build in test parameterisation. Test parameterisation need to be implemented by the consuming library. See [Attribute-Based Parameterization](https://github.com/fixie/fixie/wiki/Customizing-the-Test-Project-Lifecycle#recipe-attribute-based-parameterization) for an example.

Verify.Fixie requires some customisation of the above example.

Expand Down Expand Up @@ -532,7 +535,7 @@ public Task TestCaseUsage(string arg) =>

## MSTest

<b>`Verify.MSTest` does not detect the parametrized arguments, as such `UseParameters()` is required.</b>
`Verify.MSTest` does not detect the parametrized arguments, as such `UseParameters()` is required.


### DataRow
Expand Down
2 changes: 1 addition & 1 deletion src/Verify/Naming/ParameterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void UseParameters<T>(T parameter) =>
/// <item>Verify.Expecto: Does not currently support `UseParameters()`.</item>
/// <item>Verify.Fixie: Automatically detects the method parameters via a custom ITestProject https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#fixie.</item>
/// <item>Verify.MSTest: Does not detect the parametrised arguments, as such `UseParameters()` is required..</item>
/// <item>Verify.NUnit: Automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters..</item>
/// <item>Verify.NUnit: Automatically detects the method parameters. So `UseParameters()` is not required unless using custom parameters.</item>
/// <item>Verify.Xunit: Does not detect the parametrised arguments, as such `UseParameters()` is required.</item>
/// <item>Verify.XunitV3: Automatically detect the method parameters for built in types (string, int, bool etc), but for complex types `UseParameters()` is required.</item>
/// </list>
Expand Down

0 comments on commit 58ab3ef

Please sign in to comment.