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

Test.Fluent.Assertions.Exceptions

Description

This mudule provide an assertion for check if expected Exception has been throw by IO action.

Synopsis

Assertion util functions

Exception selectors

exceptionOfType :: Exception e => ExceptionSelector e Source #

Select all an Exception of given type. This selector should be used with TypeApplications

data MyException = ThisException | ThatException
 deriving (Show)

instance Exception MyException

selectMyException = exceptionType @MyException

Exception selector type

type ExceptionSelector a = a -> a Source #