Replies: 1 comment 3 replies
-
TUnit runs in parallel by default, and you get a new class instance for each test. If your data isn't static, then you don't need to reset as your objects will be isolated to just the running test |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have started trying to use TUnit in a sandbox project I've been testing ideas with and am finding that the attribute Before(Test) is not doing what I would have expected. It should be run before each test but it's been running in a sequence ahead of all the tests. Meaning that if I have three tests the Before method runs three times in a row and then runs the three tests afterwards. I was hoping I could use the Before(Test) to reset the data being used in each test before the test is run. How would I reset data before each test is run?
TUnit Version: 0.2.55
Demo: https://github.com/mohaaron/BlazingBudget/tree/trunk/tests/BlazingBudget.TUnitTesting.Tests
Beta Was this translation helpful? Give feedback.
All reactions