assert4hs-0.0.0.1: A set of assertion for writing more readable tests cases
Copyright(c) Pawel Nosal 2021
LicenseMIT
Maintainerp.nosal1986@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010
Extensions
  • BangPatterns
  • OverloadedStrings
  • LambdaCase

Test.Fluent.Assertions.Either

Description

This module provide a set of combinators to assert Either type.

Synopsis

Documentation

isLeft :: HasCallStack => Assertion (Either a b) Source #

assert if subject under test is Left

 assertThat (Left 10) isLeft

isRight :: HasCallStack => Assertion (Either a b) Source #

assert if subject under test is Right

 assertThat (Left 10) isRight

extractingRight :: HasCallStack => Assertion' (Either a b) b Source #

assert if subject under test is Right and extract contained value

 assertThat (Left 10) extractingRight

extractingLeft :: HasCallStack => Assertion' (Either a b) a Source #

assert if subject under test is Left and extract contained value

 assertThat (Left 10) extractingLeft