Kotest Arrow Matchers
Lists the current matchers in the Arrow matcher extension library.
This page lists the current matchers in the Kotest Arrow matcher extension library.
NOTE
The `io.kotest.extensions:kotest-assertions-arrow` module is required and is versioned independently from the main Kotest project.
Search Maven Central [here](https://central.sonatype.com/search?q=io.kotest.extensions:kotest-assertions-arrow) for the latest version.
NOTE
If `io.arrow-kt:arrow-core:arrow-version` is not on the classpath, add it to avoid unresolved reference errors.
| Option | |
|---|---|
option.shouldBeSome() |
Checks that the option is type Some and returns the value. |
option.shouldBeSome(v) |
Checks that the option is type Some with value v. |
option.shouldBeNone() |
Checks that the option is type None. |
| either | |
|---|---|
either.shouldBeRight() |
Checks that the either value is type Right and returns the right value. |
either.shouldBeRight(v) |
Checks that the either value is type Right and returns the right value. |
either.shouldBeLeft() |
Checks that the either value is type Left and returns the left value. |
either.shouldBeLeft(v) |
Checks that the either value is type Left with the specific value v. |
| NonEmptyList | |
|---|---|
nel.shouldContain(e) |
Checks that the NonEmptyList contains the given element e. |
nel.shouldContainAll(e1,e2,...,en) |
Checks that the NonEmptyList contains all given elements e1,e2,...,en. |
nel.shouldContainNull() |
Checks that the NonEmptyList contains at least one null. |
nel.shouldContainNoNulls() |
Checks that the NonEmptyList contains no nulls. |
nel.shouldContainOnlyNulls() |
Checks that the NonEmptyList contains only nulls, or is empty. |
nel.shouldHaveDuplicates() |
Checks that the NonEmptyList has at least one duplicate. |
nel.shouldBeSingleElement(e) |
Checks that the NonEmptyList has the given single element. |
nel.shouldBeSorted() |
Checks that the NonEmptyList is sorted. |
| Validated | |
|---|---|
validated.shouldBeValid() |
Checks that the validated value is type Valid and returns the valid value. |
validated.shouldBeValid(v) |
Checks that the validated value is type Valid with the specific value v. |
validated.shouldBeInvalid() |
Checks that the validated value is type Invalid and returns the invalid value. |
validated.shouldBeInvalid(v) |
Checks that the validated value is type Invalid with the specific value v. |