Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Also what development environment are you using? Commented Dec 14, 2011 at 11:36
  • 1
    You could consider a test that fails to compile a failing test... </sarcasm> TDD's purpose is to help you, not to beat you over the head with regulations :) When @Ikke says interface, BTW, they mean public interface (class methods/properties), not a C# or Java interface. Commented Dec 14, 2011 at 12:43
  • @MerlynMorgan-Graham Why the sarcasm? It is pretty standard in TDD to consider not compiling as a failing test. butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Commented Nov 16, 2015 at 23:39
  • I guess it's not so sarcastic after all. I must have felt snarky that day, even though looking back on it now I see nothing snarky. I've since then come across solutions involving use of the dynamic keyword and a factory function to return your class under test. This allows you to compile and run your test suite, even though methods or whole classes might be missing, and treat binding errors as runtime errors instead of compile time. This lets you write all the tests first, even before writing a single piece of code. There is a minor abstraction cost in your tests, so it is subject to taste. Commented Nov 17, 2015 at 2:03