Exemplo n.º 1
0
 public void Event_should_be_TestEvent()
 {
     PublishedEvents.ShouldAllBeEquivalentTo(new DomainEvent[]
     {
         new TestAggregateCreated(1.MakeGuid())
         {
             Version = 1
         },
         new TestMethodCalled(1.MakeGuid())
         {
             Version = 2
         }
     }, options => options.Excluding(e => e.TimeStamp)
                                             .Excluding(e => e.SessionInfo));
 }
Exemplo n.º 2
0
        public void Event_should_be_TestEvent()
        {
            var info = new SessionInfo();

            PublishedEvents.ShouldAllBeEquivalentTo(new DomainEvent[]
            {
                new TestAggregateCreated(Guid.NewGuid())
                {
                    Id = GetGuid(1), SessionInfo = info, Version = 1
                },
                new TestOtherAggregateCreated(Guid.NewGuid())
                {
                    Id = GetGuid(2), SessionInfo = info, Version = 1
                }
            }, options => options.Excluding(e => e.TimeStamp));
        }
Exemplo n.º 3
0
 protected void ExpectEvents(params DomainEvent[] domainEvents)
 {
     PublishedEvents.ShouldAllBeEquivalentTo(domainEvents, DefaultExclude);
 }