How do you know what to code if you are not clear about the code's expected behaviour?
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.
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.
From what you're describing your issue might not be TDD but defining and implementing the right tests for your systems.
I would say, look at your functions. How can you test them? Look at your interfaces. How can you test them?
TDD is just doing that before you code.