From the course: Advanced ASP.NET Core: Unit Testing
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Set up MVC testing project - ASP.NET Core Tutorial
From the course: Advanced ASP.NET Core: Unit Testing
Set up MVC testing project
- [Instructor] Now that we know what our app looks like let us go to Visual Studio and set up our testing project. In here we are going to create a new project, so let us right click on the solution then go to Add New Project. Search in here for xUnit because we are going to use the xUnit.net framework. Choose the option xUnit Test Project for the .NET Core and then click the Next button. In here let us provide a project name. I'll name this project LibraryApp.test and then click the Create button. Now that our project was created let us right click on the Dependencies and add the reference to the LibraryApp. So in here, check this checkbox, and then click the Okay button. When we created the project, the template, by default, created a UnitTest1.cs file. Let us rename this file to our unit testing file. So press F2 to rename this file the name of the controller that we are going to unit test. That is going to be…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
ASP.NET Core MVC project overview5m
-
(Locked)
Set up MVC testing project2m 34s
-
(Locked)
Unit testing index ActionResult7m 55s
-
(Locked)
Challenge: Unit testing details ActionResult54s
-
(Locked)
Solution: Unit testing details ActionResult9m 54s
-
(Locked)
Unit testing create ActionResult7m 45s
-
(Locked)
Unit testing remove ActionResult5m 30s
-
(Locked)
-