In this blog post, we will learn to write unit tests for various MVC controller’s behaviors, such as view’s return types, redirecting to different actions etc. Specifically, we’ll cover writing Unit Tests for:
- ViewData of the Controller
- TempData of the Controller
- ViewBag of the Controller
- View of the Controller
Let’s get started!
Creating the MVC Project under Test
Let us go ahead and create…