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(); }
public void CannotApplyOtherInvalidChangeToAggregate() { // arrange var aggregate = new BadAggregate(); int? @event = 1; // act Action action = () => aggregate.ApplyEvent(@event); // assert action.ShouldThrow <RuntimeException>(); }