| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Eventium.TestHelpers
Description
Common test functionality
Synopsis
- newtype Counter = Counter {}
- type CounterProjection = Projection Counter CounterEvent
- counterProjection :: CounterProjection
- type CounterCommandHandler = CommandHandler Counter CounterEvent CounterCommand
- counterCommandHandler :: CounterCommandHandler
- data CounterEvent
- = Added { }
- | CounterFailedOutOfBounds
- data CounterCommand
- newtype EventStoreRunner (m :: Type -> Type) = EventStoreRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> m a) -> IO a)
- newtype GlobalStreamEventStoreRunner (m :: Type -> Type) = GlobalStreamEventStoreRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> m a) -> IO a)
- eventStoreSpec :: forall (m :: Type -> Type). Monad m => EventStoreRunner m -> Spec
- globalStreamEventStoreSpec :: forall (m :: Type -> Type). Monad m => GlobalStreamEventStoreRunner m -> Spec
- newtype VersionedProjectionCacheRunner (m :: Type -> Type) = VersionedProjectionCacheRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> VersionedProjectionCache Counter m -> m a) -> IO a)
- versionedProjectionCacheSpec :: forall (m :: Type -> Type). Monad m => VersionedProjectionCacheRunner m -> Spec
- newtype GlobalStreamProjectionCacheRunner (m :: Type -> Type) = GlobalStreamProjectionCacheRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> GlobalStreamProjectionCache Text Counter m -> m a) -> IO a)
- globalStreamProjectionCacheSpec :: forall (m :: Type -> Type). Monad m => GlobalStreamProjectionCacheRunner m -> Spec
- data Text
- module Control.Monad
- module Control.Monad.IO.Class
- module Control.Monad.Logger
Documentation
Example Projection/CommandHandler
data CounterEvent Source #
Constructors
| Added | |
Fields | |
| CounterFailedOutOfBounds | |
Instances
| FromJSON CounterEvent Source # | |
Defined in Eventium.TestHelpers | |
| ToJSON CounterEvent Source # | |
Defined in Eventium.TestHelpers Methods toJSON :: CounterEvent -> Value # toEncoding :: CounterEvent -> Encoding # toJSONList :: [CounterEvent] -> Value # toEncodingList :: [CounterEvent] -> Encoding # omitField :: CounterEvent -> Bool # | |
| Show CounterEvent Source # | |
Defined in Eventium.TestHelpers Methods showsPrec :: Int -> CounterEvent -> ShowS # show :: CounterEvent -> String # showList :: [CounterEvent] -> ShowS # | |
| Eq CounterEvent Source # | |
Defined in Eventium.TestHelpers | |
data CounterCommand Source #
Instances
| FromJSON CounterCommand Source # | |
Defined in Eventium.TestHelpers Methods parseJSON :: Value -> Parser CounterCommand # parseJSONList :: Value -> Parser [CounterCommand] # | |
| ToJSON CounterCommand Source # | |
Defined in Eventium.TestHelpers Methods toJSON :: CounterCommand -> Value # toEncoding :: CounterCommand -> Encoding # toJSONList :: [CounterCommand] -> Value # toEncodingList :: [CounterCommand] -> Encoding # omitField :: CounterCommand -> Bool # | |
| Show CounterCommand Source # | |
Defined in Eventium.TestHelpers Methods showsPrec :: Int -> CounterCommand -> ShowS # show :: CounterCommand -> String # showList :: [CounterCommand] -> ShowS # | |
| Eq CounterCommand Source # | |
Defined in Eventium.TestHelpers Methods (==) :: CounterCommand -> CounterCommand -> Bool # (/=) :: CounterCommand -> CounterCommand -> Bool # | |
newtype EventStoreRunner (m :: Type -> Type) Source #
Constructors
| EventStoreRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> m a) -> IO a) |
newtype GlobalStreamEventStoreRunner (m :: Type -> Type) Source #
Constructors
| GlobalStreamEventStoreRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> m a) -> IO a) |
eventStoreSpec :: forall (m :: Type -> Type). Monad m => EventStoreRunner m -> Spec Source #
globalStreamEventStoreSpec :: forall (m :: Type -> Type). Monad m => GlobalStreamEventStoreRunner m -> Spec Source #
newtype VersionedProjectionCacheRunner (m :: Type -> Type) Source #
Constructors
| VersionedProjectionCacheRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> VersionedEventStoreReader m CounterEvent -> VersionedProjectionCache Counter m -> m a) -> IO a) |
versionedProjectionCacheSpec :: forall (m :: Type -> Type). Monad m => VersionedProjectionCacheRunner m -> Spec Source #
newtype GlobalStreamProjectionCacheRunner (m :: Type -> Type) Source #
Constructors
| GlobalStreamProjectionCacheRunner (forall a. (VersionedEventStoreWriter m CounterEvent -> GlobalEventStoreReader m CounterEvent -> GlobalStreamProjectionCache Text Counter m -> m a) -> IO a) |
globalStreamProjectionCacheSpec :: forall (m :: Type -> Type). Monad m => GlobalStreamProjectionCacheRunner m -> Spec Source #
A space efficient, packed, unboxed Unicode text type.
Instances
| FromJSON Text | |
Defined in Data.Aeson.Types.FromJSON | |
| FromJSONKey Text | |
Defined in Data.Aeson.Types.FromJSON | |
| ToJSON Text | |
| ToJSONKey Text | |
Defined in Data.Aeson.Types.ToJSON | |
| ToLogStr Text | |
Defined in System.Log.FastLogger.LogStr | |
| Hashable Text | |
Defined in Data.Hashable.Class | |
| type Item Text | |
module Control.Monad
module Control.Monad.IO.Class
module Control.Monad.Logger