I know the exact expected behavior before I start coding. But I am having trouble translating that expected behavior into my TDD test cases. For example. an expected behavior could be the functionality I am building should periodically look into database, compute some metrics and then generate a report.
This is a broad piece of expected behavior, unlike a unit test when you test small functionality.
As per the TDD principles, it is advised to write tests at your interface and avoid any dependency on your implementation details as these may change in future. I am having a hard time trying to understand how do I do this for the use case I just mentioned ?
This is one of the principles of TDD: be clear about what your code should do (i.e. it's behaviour) before you start coding.