arnonax / TestEssentials

Utilities that are useful for unit tests and Coded UI tests and more...
MIT License
24 stars 9 forks source link

AddCleanupAction doesn't work from field initializers #3

Open arnonax opened 7 years ago

arnonax commented 7 years ago

When calling AddCleanupAction from a constructor or from constructors of object that are called from field initializers, the cleanup action does not get called. A new scope should be created for these actions, and they should be called just after the TestCleanup's cleanup actions.