当前位置: 首页 > 工具软件 > xUnit.net > 使用案例 >

Getting Started with xUnit.net (desktop)

葛磊
2023-12-01

https://xunit.github.io/docs/getting-started-desktop.html

In this article, we will demonstrate getting started with xUnit.net, showing you how to write and run your first set of unit tests.

Write your first theory

You may have wondered why your first unit tests use an attribute named [Fact] rather than one with a more traditional name like Test. xUnit.net includes support for two different major types of unit tests: facts and theories. When describing the difference between facts and theories, we like to say: 

Facts are tests which are always true. They test invariant conditions.

Theories are tests which are only true for a particular set of data.

 

 类似资料: