MSTest Enhancer

MSTestEnhancer is a MSTest v2 extension to connect unit test and the method that should be tested. You'll find out that all unit test contracts are listed under target methods, and you can see all the result of them directly, no need to translate the obscure method name into what you want to test.

Notice that the name of class and method are almost the name of the tested class and tested method. As a result, we don't need to think about anything about naming unit test, nor to read the obscure name of the unit test.

Unit Test with Arguments

Some unit tests need multiple values to verify the contracts, so MSTestEnhancer provides WithArguments method to config the arguments.

"Contract 1: {0} and {1} are allowed in the contract description.".Test((int a, int b) =>
{
// Now, a is 2 and b is 3.
}).WithArguments(2, 3);
"Contract 2".Test((int a, int b) =>
{
// Now the test case will run twice. The first group, a is 2 and b is 3; and the second group, a is 10 and b is 20.
// ValueTuple is supported, too.
}).WithArguments((2, 3), (10, 20));

In this example, the contract description will be replaced to the arguments that you have passed into.

Async Unit Test

All Test extension method support async action so that you can test any async method.

Some Fantastic Feature

Nested unit test classes are supported by MSTest v2, so you can write an infinite level unit test tree.

MSTest Enhancer

MSTestEnhancer is a MSTest v2 extension to connect unit test and the method that should be tested. You'll find out that all unit test contracts are listed under target methods, and you can see all the result of them directly, no need to translate the obscure method name into what you want to test.

Notice that the name of class and method are almost the name of the tested class and tested method. As a result, we don't need to think about anything about naming unit test, nor to read the obscure name of the unit test.

Unit Test with Arguments

Some unit tests need multiple values to verify the contracts, so MSTestEnhancer provides WithArguments method to config the arguments.

"Contract 1: {0} and {1} are allowed in the contract description.".Test((int a, int b) =>
{
// Now, a is 2 and b is 3.
}).WithArguments(2, 3);
"Contract 2".Test((int a, int b) =>
{
// Now the test case will run twice. The first group, a is 2 and b is 3; and the second group, a is 10 and b is 20.
// ValueTuple is supported, too.
}).WithArguments((2, 3), (10, 20));

In this example, the contract description will be replaced to the arguments that you have passed into.

Async Unit Test

All Test extension method support async action so that you can test any async method.

Some Fantastic Feature

Nested unit test classes are supported by MSTest v2, so you can write an infinite level unit test tree.