testing
C# and .NET Unit Testing Articles, Tutorials & News
C# and .NET Unit Testing articles, tutorials, and news from the DotNetNews archive.
143 articles Updated Page 3 of 6
Browse additional C# and .NET Unit Testing articles from the DotNetNews archive.
C# and .NET Unit Testing articles
Page 3 of 6
Newest first
-
7 FluentValidation Recipes for Clean ASP.NET Controllers
medium.com Issue #354
Move validation out of controllers with FluentValidation: complex rules, custom validators, and DI-powered async checks. Continue reading on .Net Code Chronicles »
-
Why Do You Need To Write Architecture Tests in .NET
antondevtips.com Issue #354
Explore how to write Architecture Tests with NetArchTest in .NET. Learn how Architecture Tests in .NET improve software quality, enforce and test design rules, prevent technical dept. Architecture Tes
-
ASP.NET Core pipeline, C# 14, and .NET 10 networking
DotNetNews Issue #349
A varied .NET roundup covering filters, middleware, dependency injection, testing, logging, LINQ performance, and new platform features.
-
Async, DI, and Blazor pitfalls
DotNetNews Issue #344
This issue covers async gotchas, DI guidance, Blazor Server memory leaks, EF Core queries, debugging tricks, and MAUI age verification.
-
TDD in .NET: Practicing with String Calculator
medium.com Issue #342
Practicing TDD with a simple String Calculator
-
No more public partial class Program in .NET 10
steven-giesel.com Issue #333
If you are using API Tests with the WebApplicationFactory you might did something like this to have a public Program class: public partial class Program; No more!
-
TUnit — Why I Spent 2 Years Building a New .NET Testing Framework
medium.com Issue #333
I started building TUnit around two years ago. For those who have followed the journey, you’ll be glad to see the recent release of…
-
New dotnet test Experience with Microsoft.Testing.Platform
youtube.com Issue #330
.NET Aspire 13 — Simplified orchestration for cloud-native apps: https://aka.ms/aspire13/announcement Learn how the new platform works with popular testing frameworks like MSTest, NUnit, and xUnit.
-
-
Understanding Recursion in C# – Find Sum of N Natural Numbers
c-sharpcorner.com Issue #324
Learn recursion in C# using ASP.NET WebForms! This tutorial explains how to calculate the sum of N natural numbers with a practical, step-by-step example.
-
Why Use the Unit of Work Pattern in .NET
malshikay.medium.com Issue #318
Build Consistent, Maintainable, and Testable ASP.NET Core Applications with the Unit of Work Pattern
-
10 Mind-Blowing C# Record Features You’re (Definitely) Not Using Right
blog.stackademic.com Issue #318
Most developers barely scratch the surface of what Records can do. Continue reading on Stackademic »
-
Testing HttpClient in .NET without Moq or NSubstitute
medium.com Issue #316
How to unit test HTTP clients in .NET without relying on mocking frameworks (Moq or NSubstitute) using DelegatingHandler.
-
Automating Chrome Browser with Selenium in C#
c-sharpcorner.com Issue #311
Learn how to automate the Chrome browser using Selenium WebDriver with C# for web testing, scraping, and task automation. This tutorial provides a step-by-step guide, from setting up your C# project i...
-
️ How to Write Architecture Tests for Clean Architecture with .NET 9
medium.com Issue #311
Maintaining a Clean Architecture isn’t just about writing layered code; it’s about ensuring that those layers stay clean, that…
-
11 Battle-Tested Tips for Unit Testing CQRS Handlers (with Moq, FluentAssertions, and xUnit) — from…
medium.com Issue #310
If you want the full source code, join our community: Here
-
Use fixtures in xUnit for shared context in unit tests
roundthecode.com Issue #309
Learn how to use xUnit fixtures like IClassFixture and ICollectionFixture to share setup and context across your unit tests efficiently. The page Use fixtures in xUnit for shared context in unit tests...
-
Mocking HTTP Calls with HttpClientFactory in .NET
medium.com Issue #305
Test External APIs Without the Internet: HttpClientFactory + Moq Explained — Build isolated and deterministic unit tests for your .NET app.
-
Integrating GitHub Copilot with Playwright
c-sharpcorner.com Issue #303
This article provides a step-by-step approach to integrating Copilot into your Playwright workflow, covering IDE setup, resilient locators, Page Object Model implementation, CI/CD integration with Git...
-
ASP.NET Community Standup - Vibe coding a C# MCP server
youtube.com Issue #292
Unit testing for a .NET Web API project.
-
Types of Unit Tests in C# — Master Testing Like a Pro
medium.com Issue #289
Complete guide to unit testing in C#. Learn all types of tests: basic unit tests, mocks, parametrised tests, async testing, property-based…
-
C# Tip: injecting and testing the current time with TimeProvider and FakeTimeProvider
code4it.dev Issue #280
Dates used to be difficult to test. But with TimeProvider and FakeTimeProvider, everything becomes possible!
-
Handle Nulls Like a Pro: 6 Smarter Alternatives to Null-Forgiving in C#
medium.com Issue #280
Using the null-forgiving operator (!) too often usually points to a problem. Here are safer and cleaner ways to avoid it.
-
Adding TDD to Legacy .NET Code Without Breaking Production
medium.com Issue #278
How to gradually introduce tests to existing Windows Forms, WPF, and WCF applications when “don’t break anything” is your #1 priority
-
Beyond the Code: Why Testing in .NET is More Than Bug Hunting
medium.com Issue #275
When developers hear the word testing, the immediate thought is often about catching bugs. But in reality, testing is less about hunting…