xUnit has different mechanisms to share test context and dependencies. Not only it allows us to share different dependencies between tests, but also between multiple test classes. We can also choose to get a fresh set of data every time for our test. So in this post, I’m going to go though those mechanism with …
IClassFixture
Share Expensive Object Between Tests By IClassFixture
When XUnit run a test method, it’s going to create a new object of our test class for each and everyone of our test method. This can create a problem when the creation of the object is expensive and slow our tests down. But there’s a solution to it, we can use IClassFixture to share …