I see lots of TDD practitioners following this cycle:
1) Write your test as if the target objects and API already exists.
2) Compile the solution and see it break.
3) Write just enough code to get it to compile.
4) Run the test and see if fail.
5) Write just enough code to get it to pass.
6) Run the test and see it pass
7) Refactor
What is the advantage of steps 1 and 2? With IDEs like Visual Studio this is really annoying to do, since intellisense jumps all over the place trying to guess methods and attributes that are not there.
I usually start on step 3, having all my methods throwing NotImplementedException, and this seems perfectly fine for me, but maybe I am missing something.
Edit for clarification: this is not a question why I should see a test fail before it passes; that is covered on step 3 onwards, and it makes total sense. My question is why even before that people will call a method on the unit test that doesn't exist in the API (therefore VS will show a red squiggle, or paint the whole method name red etc) and try to compile anyway. For me the fact that VS is telling me that the method does not exist is good enough.