Exemplo n.º 1
0
        public void CanApplyInvalidChangeToAggregateWithoutEffectOrException()
        {
            // arrange
            var aggregate = new BadAggregate();
            var @event = 1;

            // act
            aggregate.ApplyEvent(@event);

            // assert
            aggregate.BadChange.Should().BeNull();
        }
Exemplo n.º 2
0
        public void CanApplyOtherInvalidChangeToAggregateWithoutEffectOrException()
        {
            // arrange
            var  aggregate = new BadAggregate();
            int? @event    = 1;

            // act
            aggregate.ApplyEvent(@event);

            // assert
            aggregate.BadChange.Should().BeNull();
        }
Exemplo n.º 3
0
        public void CannotApplyOtherInvalidChangeToAggregate()
        {
            // arrange
            var  aggregate = new BadAggregate();
            int? @event    = 1;

            // act
            Action action = () => aggregate.ApplyEvent(@event);

            // assert
            action.ShouldThrow <RuntimeException>();
        }