public void CanApplyInvalidChangeToAggregateWithoutEffectOrException()
        {
            // arrange
            var aggregate = new BadAggregate();
            var @event = 1;

            // act
            aggregate.ApplyEvent(@event);

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

            // act
            aggregate.ApplyEvent(@event);

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

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

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