Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Series
.NET Core Web API
36
Angular
31
JavaScript Basics
19
JavaScript Intermediate
18
JavaScript Advanced
16
TypeScript Basics
14
TypeScript Intermediate
14
TypeScript Advanced
12
Entity Framework Core
28
Dapper
16
Git & GitHub
29
Web Security (OWASP Top 10)
21
LLM Fundamentals
20
C# Fundamentals
20
Object-Oriented Programming in C#
16
C# Collections and Generics
11
LINQ
17
Asynchronous Programming in C#
17
Advanced C#
14
C# Versions
6
Solution Patterns
22
SOLID and Design Principles
12
Clean Code
13
Design Patterns
23
UML and Modeling
18
Introduction to Software Architecture
9
Clean, Onion and Hexagonal Architecture
8
Vertical Slice Architecture
6
Domain-Driven Design
12
CQRS and Event Sourcing
10
Messaging and Event-Driven Architecture
9
Modular Monolith
2
Microservices
10
UI Architecture Patterns
9
Architecture Decisions
7
System Design
15
Distributed Systems Fundamentals
11
Background Jobs and Scheduled Jobs
11
Working with Message Queues
14
Logging in .NET
10
Caching
10
Real-time Applications
9
ASP.NET Core MVC and Razor Pages
13
CI/CD Fundamentals
8
GitHub Actions
16
Jenkins
12
Web Servers and Hosting
12
Deployment Strategies
9
Kubernetes
19
Authentication and Authorization
18
ASP.NET Core Security
8
Frontend Security
9
API Security (OWASP API Top 10)
11
AI with .NET
14
RAG
13
AI Agents and MCP
14
Test Strategy
4
Unit Testing
13
Testing & Quality
PART 07
Mocking Libraries in Depth: NSubstitute, Moq and FakeItEasy
NSubstitute, Moq and FakeItEasy share the same Castle DynamicProxy engine, so they can only fake interfaces and virtual members, and the differences between them are mostly syntax and failure messages. The same payment scenarios in all three: argument matching and capture, sequential returns, async exceptions, call count and order, strict mode, the NS1000 analyzer warning and Moq's 2023 SponsorLink incident.
8 Nov 2026
11 min
4
Backend
PART 29
Unit Testing an ASP.NET Core Web API: Service and Controller Tests with xUnit and Moq
Unit testing an ASP.NET Core Web API with xUnit and Moq: the right package versions for net6.0, AAA and naming, Setup and Verify, the Result/Value difference in ActionResult<T> tests, Theory, and a comparison with NSubstitute.
4 Nov 2026
11 min
46