Ejemplo n.º 1
0
        public void When_an_event_with_a_non_matching_aggregate_id_is_added_then_it_throws()
        {
            var list = new EventSequence(Guid.NewGuid());

            list.Invoking(l => l.Add(new TestEvent {
                AggregateId = Guid.NewGuid()
            }))
            .ShouldThrow <ArgumentException>();
        }
Ejemplo n.º 2
0
        public void When_an_event_with_a_non_matching_aggregate_id_is_added_then_it_throws()
        {
            var list = new EventSequence(Guid.NewGuid());

            list.Invoking(l => l.Add(new TestEvent { AggregateId = Guid.NewGuid() }))
                .ShouldThrow<ArgumentException>();
        }