To ensure developers put into the right place the Data annotation.
Here are some examples:
// Bad
[Data]
function myTest () {
// ...
};
// Bad
[Fact, Data]
function myTest () {
// ...
};
// Bad
[Fact, Data()]
function myTest () {
// ...
};
// Bad
[Fact, Data(myVar1, myVar2)]
function myTest () {
// ...
};
// Bad
[Fact, Data(myVar1)]
function myTest () {
// ...
};
// Good
[Fact, Data(myVar)]
function myTest (data) {
// ...
};
suffix
will be used (when defined) to put a convention on the Data annotation parameter where we take the test function name and we add a suffix (Default''
).dataParameterName
will be used (when defined) to put a convention on the test function parameter name (Default''
).
Examples of correct code for the default { "suffix": { "Data" } }
option:
[Fact, Data(myTestData)]
function myTest(data) {
// ...
};
Examples of correct code for the default { "dataParameterName": { "myData" } }
option:
[Fact, Data(myTestData)]
function myTest(myData) {
// ...
};