English | 日本語 | 简体中文 | 繁體中文 |
---|
Don't you think that naming is very very hard? Especially naming for unit test method? Read this article for more data of naming: Don’t go into programming if you don’t have a good thesaurus - ITworld.
CUnit (MSTestEnhancer) helps you to write unit tests without naming any method.
CUnit is a contract-style unit test extension for MSTestv2. You can write method contract descriptions instead of writing confusing test method name when writing unit tests.
You can write unit test like this:
[TestClass]
public class DemoTest
{
[ContractTestCase]
public void Foo()
{
"When A happened, result A'.".Test(() =>
{
// Arrange
// Action
// Assert
});
"But when B happened, result B'".Test(() =>
{
// Arrange
// Action
// Assert
});
}
}
Then you'll see this kind of test result in testing explorer window:
For more usages, please visit:
There are many ways to contribute to MSTestEnhancer
- Submit issues and help verify fixes as they are checked in.
- Review the documentation changes.
- How to Contribute
MSTestEnhancer is licensed under the MIT license