Common features in ASP.NET Core 2.1 WebApi: Authenticating with a JWT Common features in ASP.NET Core 2.1 WebApi: Validation Common features in ASP.NET Core 2.1 WebApi: Error handling Common features in ASP.NET Core 2.1 WebApi: Logging Common features in…
Category: XUnit
How to unit test private methods in .NET Core applications? (even if it’s bad)
Introduction Yes it’s bad and dirty! Since your private methods are only an implementation detail whose existence and behavior is only justified by their use in public methods, then these private methods are automatically tested through public method tests. In…
How to unit test Internal classes in .NET Core applications?
Introduction The creation of unit tests is an important step in ensuring the quality of a project. In general, most public methods are tested, but what if you want to test a non-public part of the project? Putting all classes…
Code reliability: Unit testing with XUnit and FluentAssertions in .NET Core 2 apps
Introduction I decided to write this article because I’m really fan of XUnit and FluentAssertions expecially for its great syntax. Xunit xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework. Written by the original inventor…