dev-resources.site
for different kinds of informations.
Unit Tests In ASP.NET Core Controllers
Published at
5/28/2018
Categories
dotnet
testing
tutorial
unittest
Author
Matheus Rodrigues
In this new series of posts, I want to show different aspects of testing an ASP.NET core application.
I will start in this post showing how to create unit tests for controllers. Then I am going to talk integration test in the controller and explore ASP.NET core new feature, Test Host. After that, let’s see how we can test our application business logic.
Moving to the database realm. I’m going to show how we can create unit tests for code that deals with DbContext
, using Entity Framework Core In-memory database feature. And them, how to do integration tests with a real database, with strategies to maintain a database for integration tests.
Let’s jump right into it!
Articles
12 articles in total
Integration Tests In ASP.NET Core Controllers
read article
Unit Tests In ASP.NET Core Controllers
currently reading
Improving Unit Test Readability In .Net With Fluent Assertions
read article
Mock Multiple Calls To The Same Method With FakeItEasy, Moq and NSubstitute
read article
How To: Use EntityFramework Core In-Memory Database For Unit Testing
read article
Getting Started With MongoDB Using ASP.NET Core Web API
read article
Design Patterns and Practices in .Net: Fluent Builder Test Pattern
read article
How To: Create a Simple Alert System Using Tag Helpers In Asp.Net Core Mvc
read article
Design Patterns and Practices in .Net: Option Functional Type in C#
read article
Design Patterns and Practices in .Net: Null Object and Special Case Object
read article
How To Get appsettings.json Data In Asp.Net Core MVC
read article
Unit Test And Time Dependency
read article
Featured ones: