When i was developing a console app the algorithm was the following steps:
- first create a temporary directory
- then call another command that will create an xml file inside the the temporary directory
- then read that xml file and extract a name from it
- lastly rename this temp directory to the name extracted from xml
then i use TDD from outside in and start writing Acceptance test. but i'm still confused what to test.
- Do i need to test each step of the above i.e to test if a temp file is created or not then to test what happens if IO Exception occurs, then to test if running the other command produce an xml then test if xml contain an attribute "name" etc.
- Or to test if after running the console app a folder is created with an xml only?
- how to organize my test suite if i'm going to test my algorithm step by step