# Assertion

A check that a result matches what you expect.

## What is **Assertion**?

An **assertion** checks that a result is what you expect; if not, the test fails with a message.

```csharp
Assert.Equal(108m, PriceCalculator.WithTax(100m));
```

Level: Novice · [More Unit Testing terms at this level](https://www.ask-codey.com/glossary/subjects/unit-testing/novice)

Updated: September 27, 2026

## In other subjects

- [Assertion in Java](https://www.ask-codey.com/glossary/assertion)

Source: https://www.ask-codey.com/glossary/assertion-unit-testing
