Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Constructor / Dispose instead of [Before(Test)] / [After(Test)]
Note that this fails the two test with the [NotInParallel] attribute, i.e. FilterPropertyThrowing and ExceptionFormatterThrowing. The [Test Set Ups][1] and [Test Clean Ups][2] documentation mentions respectively: > Most setup for a test can be performed in the constructor (think setting up mocks, assigning fields.) and > TUnit supports having your test class implement `IDisposable` or `IAsyncDisposable`. These will be called after your test has finished executing. So I'm not sure what's the difference between Custructor/Dispose and [Before(Test)] / [After(Test)] attributes. [1]: https://thomhurst.github.io/TUnit/docs/tutorial-extras/setup [2]: https://thomhurst.github.io/TUnit/docs/tutorial-extras/cleanup
- Loading branch information