From a96bc99d030638b4ffc15e1681ec1c3aeb10469d Mon Sep 17 00:00:00 2001 From: t0k0shi <7973370+t0k0shi@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:59:59 +0000 Subject: [PATCH] docs: remove stale AssertionGroup documentation The AssertionGroup class was removed in a previous refactor, but the documentation page and sidebar entry remained. This removes the orphaned docs page and its sidebar reference. Fixes #4966 --- docs/docs/assertions/assertion-groups.md | 38 ------------------------ docs/sidebars.ts | 1 - 2 files changed, 39 deletions(-) delete mode 100644 docs/docs/assertions/assertion-groups.md diff --git a/docs/docs/assertions/assertion-groups.md b/docs/docs/assertions/assertion-groups.md deleted file mode 100644 index a5cad45809..0000000000 --- a/docs/docs/assertions/assertion-groups.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Assertion Groups - -Mixing 'Or' & 'And' conditions within `Assert.That(...)` statements may result in unexpected logic. - -```csharp -var value = "CD"; - -await Assert.That(value) - .Contains('C').And.Contains('D') - .Or - .Contains('A').And.Contains('B'); -``` - -It might look like `(C && D) || (A && B)` but it's actually `C && (D || A) && B` - -Instead, if you want to combine complex assertion logic into a single assertion, assertion groups can be used to more clearly show a group of logic. - -For example: - -```csharp -var value = "CD"; - -var cd = AssertionGroup.For(value) - .WithAssertion(assert => assert.Contains('C')) - .And(assert => assert.Contains('D')); - -var ab = AssertionGroup.ForSameValueAs(cd) - .WithAssertion(assert => assert.Contains('A')) - .And(assert => assert.Contains('B')); - -await AssertionGroup.Assert(cd).Or(ab); -``` - -While more verbose, it's clearer how the logic will evaluate. \ No newline at end of file diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 68a3566467..5d6699037f 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -108,7 +108,6 @@ const sidebars: SidebarsConfig = { 'assertions/and-conditions', 'assertions/or-conditions', 'assertions/scopes', - 'assertions/assertion-groups', ], }, {