Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mockMethod :: (HasCallStack, MonadIO m, MockableMethod cls name m r, Default r) => Action cls name m r -> MockT m r
- mockDefaultlessMethod :: (HasCallStack, MonadIO m, MockableMethod cls name m r) => Action cls name m r -> MockT m r
Documentation
mockMethod :: (HasCallStack, MonadIO m, MockableMethod cls name m r, Default r) => Action cls name m r -> MockT m r Source #
Implements a method in a Mockable
monad by delegating to the mock
framework. If the method is called unexpectedly, an exception will be
thrown. However, an expected invocation without a specified response will
return the default value.
mockDefaultlessMethod :: (HasCallStack, MonadIO m, MockableMethod cls name m r) => Action cls name m r -> MockT m r Source #
Implements a method in a Mockable
monad by delegating to the mock
framework. If the method is called unexpectedly, an exception will be
thrown. However, an expected invocation without a specified response will
return undefined. This can be used in place of mockMethod
when the return
type has no default.