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.Exceptions

Description

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

Synopsis

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 #