> For the complete documentation index, see [llms.txt](https://docs.shouldly.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shouldly.org/documentation/satisfyallconditions.md).

# SatisfyAllConditions

Asserts that every one of the supplied conditions holds, reporting *all* the failures at once rather than stopping at the first.

Which form to use:

* **All the assertions hang off a common subject** → use the `value.ShouldSatisfy([...])` extension method. The value under test is passed to each condition, and it appears as the subject in the failure message.
* **A group of otherwise unrelated assertions** → use the static `Should.Satisfy([...])` method. There is no single subject to pass, so each condition is a self-contained assertion.

> `ShouldSatisfyAllConditions` is the original name for this assertion. It still works but is now obsolete: it cannot capture the asserted expression via `CallerArgumentExpression` and falls back to stack-trace parsing, which is not trim- or AOT-safe. Prefer `ShouldSatisfy` / `Should.Satisfy`.

## A common subject — `ShouldSatisfy`

```cs
var mrBurns = new Person { Name = null };
mrBurns.ShouldSatisfy(
                [
                    p => p.Name.ShouldNotBeNullOrEmpty(),
                    p => p.Name.ShouldBe("Mr.Burns")
                ]);
```

[<sup>snippet source</sup>](https://github.com/shouldly/shouldly/blob/master/src/DocumentationExamples/CodeExamples/ShouldSatisfyAllConditionsExamples.ShouldSatisfy.codeSample.approved.cs#L1-L6) <sup>|</sup> [<sup>anchor</sup>](#snippet-ShouldSatisfyAllConditionsExamples.ShouldSatisfy.codeSample.approved.cs)

**Exception**

```
mrBurns
    should satisfy all the conditions specified, but does not.
The following errors were found ...
---------------- Error 1 ----------------
    p.Name (null)
        should not be null or empty

---------------- Error 2 ----------------
    p.Name
        should be
    "Mr.Burns"
        but was
    null

-----------------------------------------
```

## Unrelated conditions — `Should.Satisfy`

```cs
var mrBurns = new Person { Name = null };
var homer = new Person { Name = "Homer" };
Should.Satisfy(
                [
                    () => mrBurns.Name.ShouldNotBeNullOrEmpty(),
                    () => homer.Name.ShouldBe("Mr.Burns")
                ]);
```

[<sup>snippet source</sup>](https://github.com/shouldly/shouldly/blob/master/src/DocumentationExamples/CodeExamples/ShouldSatisfyAllConditionsExamples.Satisfy.codeSample.approved.cs#L1-L7) <sup>|</sup> [<sup>anchor</sup>](#snippet-ShouldSatisfyAllConditionsExamples.Satisfy.codeSample.approved.cs)

**Exception**

```
The conditions specified should all be satisfied, but were not.
The following errors were found ...
---------------- Error 1 ----------------
    mrBurns.Name (null)
        should not be null or empty

---------------- Error 2 ----------------
    homer.Name
        should be
    "Mr.Burns"
        but was
    "Homer"
        difference
    Expected: "Mr.Burns"
    Actual:   "Homer"

-----------------------------------------
```
