Replies: 2 comments
-
A lot of the internal code is worked around instance members for tests and so would be a massive refactor without much benefit (IMO). I'd also have to build more complicated source code generation. It would be a real headache. I also just don't like the idea of static tests. They can more easily lead to leaky state due to static fields/properties/etc. TUnit can prevent that when you use instance members. I would just adopt the pattern of using instance members :) It's less code anyway! (albeit by only one keyword.) |
Beta Was this translation helpful? Give feedback.
-
That's understandable. Thank you for the clarification and all the efforts you put into TUnit. |
Beta Was this translation helpful? Give feedback.
-
In xunit.net, I can write static test classes with static test methods in them.
While this is not a widely adopted pattern, I like it when I can make tests static as this indicates it does not rely on instance fields.
Using version 0.3.43, TUnit unfortunately does not pick up static methods. Do you think it's possible to add this feature to TUnit?
Beta Was this translation helpful? Give feedback.
All reactions