We have been developing REST APIs in .Net core 3.1 and using MS TEST - Test Project in Visual Studio 2019 for unit testing.
Now we have a hard rule to follow Test Driven Development. In theory I can understand that TDD will involve writing tests to implement a requirement and continuously iterate through RED GREEN and REFACTOR cycles.
Now my question is, if I have a endpoint which will get all books according to author id from DB, like following endpoint
httpget : api/boooks/authors/1006
which will return a response, what all cases/ test methods should I write in the Test class of MSTest project, so that I can say that, I have followed Test Driven Development ?
Before TDD, I will write a TestMethod for the Service method which will call the Database layer and get the author information from SQL DB. SO only 1 test method with different input to mock, will be written.
I am very new to TDD hence the question. Any comment is helpful