Multiple choice technology web technology

Controller’s action methods cannot be unit tested without Model generation?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Controller action methods can and should be unit tested independently using mocking frameworks like Moq or NSubstitute. You mock the Model/Repository layer to test controller logic in isolation. Model generation is not required: dependency injection and mocking enable complete test coverage of controller behavior.