assert4hs-core-0.1.0: 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

Test.Fluent.Assertions.Maybe

Description

This library aims to provide a set of combinators to assert Maybe type.

Synopsis

Documentation

isNothing :: HasCallStack => Assertion (Maybe a) Source #

assert if subject under is empty

 assertThat (Just 10) isNothing

isJust :: HasCallStack => Assertion (Maybe a) Source #

assert if subject under is not empty

 assertThat (Just 10) isJust

extracting :: HasCallStack => Assertion' (Maybe a) a Source #

assert if subject under is not empty and extract contained value

 assertThat (Just 10) extracting