Skip to content

Commit a38bef4

Browse files
authored
Update README.md
1 parent 9435501 commit a38bef4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,19 @@
55
66
> [!IMPORTANT]
77
> This is **not** an official package produced by MSTest team at Microsoft.
8+
9+
For examples, see [SampleUseTests](https://github.com/Youssef1313/Combinatorial.MSTest/blob/main/tests/Combinatorial.MSTest.Tests/SampleUseTests.cs).
10+
11+
In short, the attribute `CombinatorialData` must be added along with `TestMethod`. The values used for each parameter is determined by the following rules:
12+
13+
1. If the parameter has an attribute that implements `ICombinatorialValuesProvider`, the attribute's `GetValues` method is called to determine the possible values for the given parameter.
14+
- The following attributes are already shipped and implementing `ICombinatorialValuesProvider`:
15+
- `CombinatorialValuesAttribute`
16+
- `CombinatorialRangeAttribute`
17+
- `CombinatorialRandomDataAttribute`
18+
2. Otherwise, the possible values are determined depending on the parameter type:
19+
- `bool`: `true` and `false`
20+
- `int`: `0` and `1`
21+
- `enum`: The values as returned by `Enum.GetNames`
22+
- `Nullable<T>`: The possible values of `T` plus the `null` value.
23+
- Otherwise, an exception is thrown.

0 commit comments

Comments
 (0)