From 50e666083b1edbb27ff86c7639057e0664a9b676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Sat, 31 Oct 2026 08:04:37 +0100 Subject: [PATCH] docs: illustrate what happens when a mock is called A short diagram gives the overview before the detailed steps. --- Docs/pages/core-concepts/00-index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Docs/pages/core-concepts/00-index.md b/Docs/pages/core-concepts/00-index.md index ef881211..e64b6007 100644 --- a/Docs/pages/core-concepts/00-index.md +++ b/Docs/pages/core-concepts/00-index.md @@ -68,6 +68,13 @@ Each call to the mock goes through the same steps: default value if nothing was written yet; - a mock created with `ThrowingWhenNotSetup()` throws a `MockNotSetupException` instead. +```mermaid +flowchart LR + call["Call"] --> record["Record it"] --> match{"Setup
matches?"} + match -- "yes" --> setup["Use the last
matching setup"] + match -- "no" --> fallback["Use the
MockBehavior"] +``` + ```csharp dispenser.Mock.Setup.Dispense(It.IsAny(), It.IsAny()).Returns(true); dispenser.Mock.Setup.Dispense("White", It.IsAny()).Returns(false);