コード例 #1
0
        public void FetchNoEvents()
        {
            var entity = new TrackedEntityTestClass();

            var events = entity.FetchEvents();

            events.Should().BeEmpty();
        }
コード例 #2
0
        public void FetchSingleEvents()
        {
            var entity = new TrackedEntityTestClass();

            var @event = new EventTestClass(Guid.NewGuid(), 0);

            entity.AddEvent(@event);

            var events = entity.FetchEvents();

            events.Should().Equal(new Event[] { @event });
        }
コード例 #3
0
        public void FetchMultpleEvents()
        {
            var entity = new TrackedEntityTestClass();

            var @event1 = new EventTestClass(Guid.NewGuid(), 0);

            entity.AddEvent(@event1);

            var @event2 = new EventTestClass(Guid.NewGuid(), 0);

            entity.AddEvent(@event2);

            var events = entity.FetchEvents();

            events.Should().Equal(new Event[] { @event1, @event2 });
        }