I'm just starting to get to grips with TDD, and I have 2 quick questions;
I'm assuming that if I were writing software for a software company, that TDD would work alongside the software design? i.e all the UML, ERD diagrams, flow diagrams etc...
My second question is, the way I'm doing my tests at the minute, I think about what will be called in the code (e.g a method) and I think about all the possible erroneous inputs and correct inputs. So for example, lets assume I know I need to call a "loadfile", so I write just enough code to make the test pass...
But then I also start thinking about, what if you don't specify a parameter, or an invalid file, so I write a few more tests to test for exceptions - which then involves adding a bit of logic into the method (so the correct exception is returned)
Is this the correct approach to TDD?