nerdexam
Microsoft

70-499 · Question #78

You are planning to develop a new application. You need to ensure that the code is easy to test and obtain high code coverage. What should you do?

The correct answer is D. Ensure that each class has only one responsibility. See the full explanation below for the reasoning.

Question

You are planning to develop a new application. You need to ensure that the code is easy to test and obtain high code coverage. What should you do?

Options

  • ACreate as many static methods as possible.
  • BCreate a fake for each class that you are testing.
  • CEnsure that concrete classes depend only on other concrete classes.
  • DEnsure that each class has only one responsibility.

How the community answered

(32 responses)
  • A
    3% (1)
  • B
    13% (4)
  • C
    3% (1)
  • D
    81% (26)

Community Discussion

No community discussion yet for this question.

Full 70-499 Practice