Following a debate
yesterday I got to thinking (it’s a rare event, and I like to revel in it when it happens). There may be technical reasons why you have to use [Fact] for a “regular” unit test (oh, I know it’s not a unit test, it’s a specification, humour me) and [Theory] for “data driven” tests. But from a usage point of view, why should I care if it’s data driven or not? Wouldn’t it be nice if the test runner would be able to identify a parameterless method and say “hey, this must be a regular unit test”. Also,if the method has parameters it could be smart enough to say “hmm… this must be a data driven test. Do I have any data available?”. If the developer hasn’t provided any data, then the test, I mean spec, fails.
I think I fall on Dave’s side of the argument that this feels like changing somewhat standardized terminology just for the sake of being different (or maybe it’s trendy to keep up with the Ruby folks?).
What do you think, dear reader?