Skip to content

Commit

Permalink
Improve headings
Browse files Browse the repository at this point in the history
  • Loading branch information
Christer van der Meeren committed Sep 12, 2023
1 parent f9607ff commit 07e606a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
* [Installation and requirements](#installation-and-requirements)
* [Avoiding `|> ignore` after assertion chains](#avoiding--ignore-after-assertion-chains)
* [Writing your own assertions](#writing-your-own-assertions)
* [A basic example](#a-basic-example)
* [A basic assertion](#a-basic-assertion)
* [Derived state](#derived-state)
* [A complex assertion](#a-complex-assertion)
* [Higher-order assertions](#higher-order-assertions)
* [Full guide](#full-guide)
* [Customizing the format](#customizing-the-format)
* [Configuring options](#configuring-options)
* [Security considerations](#security-considerations)
Expand Down Expand Up @@ -78,7 +79,7 @@ in [this folder](https://github.com/cmeeren/Faqt/tree/main/src/Faqt)).

All the details are further below, but first, we'll get a long way just by looking at some examples.

### A basic example
### A basic assertion

Here is Faqt’s simplest assertion, `Be`:

Expand Down Expand Up @@ -142,7 +143,7 @@ type Assertions =
This allows users to continue asserting on the derived state (the inner value, in this case), for example like
this: `nullableInt.Should().HaveValue().That.Should(()).Be(2)`.

### A complex assertion
### Higher-order assertions

Finally, let's look at a more complex assertion - a higher-order assertion that calls user assertions and which also
asserts for every item in a sequence:
Expand Down Expand Up @@ -190,6 +191,8 @@ Note that in this case we use `t.Assert(true, true)` at the top. Both parameters
indicates that this is a higher-order assertion, and the second `true` indicates that the assertions are run for each
item in a sequence. Note also that we call `use _ = t.AssertItem()` before the assertion of each item.

### Full guide

The most significant thing _not_ demonstrated in the examples above is that if your assertion calls `Should`, make sure
to use the `Should(t)` overload instead of `Should()`.

Expand Down

0 comments on commit 07e606a

Please sign in to comment.