ASP.NET Core Unit Testing with FluentAssertions

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Fluent Assertions

    A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET Core 2.1, .NET Core 3.0, .NET 6, .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.

  • FluentAssertions is one of the most popular (over 66 million downloads on Nuget) .NET library that contains a large collection of .NET extension methods that allow .NET developers to write unit tests using a fluent syntax which is very easy to read and write and clearly shows the intent of the unit test. The library has extension methods to test almost everything related to .NET such as Strings, Booleans, Dates, Guids, Collections, Exceptions, and even Nullable Types. You can add this library to your unit test projects via Nuget package manager and start using this library in few minutes.

  • xUnit

    xUnit.net is a free, open source, community-focused unit testing tool for .NET.

  • A unit test is a way to test the smallest unit of the software. In almost all programming languages, this smallest unit is normally a function (method), a subroutine, or a property. When we do unit testing, we check whether a particular property has the expected value or a particular method is returning a value or result we are expecting it to return. There are many popular unit test frameworks available for almost all programming languages and all types of applications. The three most popular unit tests frameworks used by many .NET developers around the world are NUnit, xUnit, and MSTest. All of these frameworks have their pros and cons but they all have an extensive set of features for writing unit tests. These three unit test frameworks are so popular that Microsoft Visual Studio has built-in project templates for these frameworks.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • NUnit

    NUnit Framework

  • A unit test is a way to test the smallest unit of the software. In almost all programming languages, this smallest unit is normally a function (method), a subroutine, or a property. When we do unit testing, we check whether a particular property has the expected value or a particular method is returning a value or result we are expecting it to return. There are many popular unit test frameworks available for almost all programming languages and all types of applications. The three most popular unit tests frameworks used by many .NET developers around the world are NUnit, xUnit, and MSTest. All of these frameworks have their pros and cons but they all have an extensive set of features for writing unit tests. These three unit test frameworks are so popular that Microsoft Visual Studio has built-in project templates for these frameworks.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts