To ensure developers call existing xunit api methods, this rule will check the call of any xunit object used into the tests.
Here are some examples:
// Bad
Assert.equal('a', 'b');
// Good
Assert.Equal('a', 'b');
extendedApi
allows to add more objects and associated methods in the case the developer extends the xunit api (Default{}
).
Examples of incorrect code for the default { "extendedApi": { }
option:
Assert.MyAssertMethod('a', 'b');
Examples of correct code for the default { "extendedApi": { Assert: ['MyAssertMethod'] } }
option:
Assert.MyAssertMethod('a', 'b');