752 B
752 B
| name | description |
|---|---|
| Write mutations | Trigger when asked to write mutations |
Annotate tests with one or more mutations (MutationCases) that will cause the test to fail.
Example:
[<Fact>]
[<MutationCase("calc-operator-mixup", "Calculator/Calculator.fs", 4, "value + 1", "value - 1")>]
member _.AddOne_increments() =
Assert.Equal(42, Calculator.addOne 41)
In this example,
calc-operator-mixupis the mutation name,Calculator/Calculator.fsis the path to the production code (relative to the repository root),4is the number of the line to mutate,value + 1is the string to find, andvalue - 1is the string to replace it with.
Verify your work with mutannot --run <mutation id 1> <mutation id 2> <...>.