setup in xunit

https://xunit.github.io/docs/shared-context

Shared Context between Tests

It is common for unit test classes to share setup and cleanup code (often called "test context"). xUnit.net offers several methods for sharing this setup and cleanup code, depending on the scope of things to be shared, as well as the expense associated with the setup and cleanup code.

原文地址:https://www.cnblogs.com/chucklu/p/10114901.html