Esempio n. 1
0
        public IEventChecker <TEntity> Raised <TEvent>(Action <TEvent> factory) where TEvent : Messages.IEvent
        {
            var @event = _factory.Create(factory);

            if (!_entity.Uncommitted.Any(x => JsonConvert.SerializeObject(x.Event) == JsonConvert.SerializeObject(@event)))
            {
                throw new DidNotRaisedException(@event, _entity.Uncommitted.Select(x => x.Event as Messages.IEvent).ToArray());
            }

            return(this);
        }
Esempio n. 2
0
 public IEventPlanner <TEntity> HasEvent <TEvent>(Action <TEvent> factory)
 {
     _events.AddEvent <TEntity>(_bucket, _id, _parent.GetParentIds(), (Messages.IEvent)_factory.Create(factory));
     return(this);
 }
Esempio n. 3
0
 public Task <TResponse> Process <TService, TResponse>(Action <TService> service, IContainer container) where TService : IService <TResponse>
 {
     return(Process <TService, TResponse>(_factory.Create(service), container));
 }