# Moq and NSubstitute

.NET libraries for creating mocks.

## What is **NSubstitute**?

**NSubstitute** is a .NET library for creating mocks from interfaces.

```csharp
var email = Substitute.For<IEmailSender>();
new OrderService(email).Place(order);
email.Received(1).Send(Arg.Any<Message>());
```

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/journeyman)

Updated: October 15, 2026

Source: https://www.ask-codey.com/glossary/moq-and-nsubstitute
