4.3.1 Question
Multiple Choice
You are under contract with a large company that is starting to implement a TDD approach. As part of the long-term support for this effort, the company needs you to complete several unit tests. As you review the current code base, you find good tests for the model, but no tests for anything other than the model. Which of the following is the best approach to complete the unit tests?
- A. Create a new directory in the unit test project for the controller- and action-specific tests. Create a unit test file for each controller. Inside that file, have one or more tests for only the controller action methods.
- B. Add a new file to the unit test project called ControllerTests. Put all tests for all the controllers and the actions in the file.
- C. Create a new directory in the unit test project for the controller- and action-specific tests. Create a unit test file for each action you are going to test.
- D. Create a new directory in the unit test project for the controller- and action-specific tests. Create a unit test file for each controller. Inside that file have one or more tests for all methods in the controller, regardless of whether they are an action or not.