public void RejectReturnsCorrectResult(RequestReservationCommand sut) { ReservationRejectedEvent actual = sut.Reject(); sut.AsSource().OfLikeness<ReservationRejectedEvent>().ShouldEqual(actual); }
public void ReserveCapacityReturnsCorrectResult(RequestReservationCommand sut) { CapacityReservedEvent actual = sut.ReserveCapacity(); sut.AsSource().OfLikeness<CapacityReservedEvent>() .ShouldEqual(actual); }
public void WithQuantityReturnsCorrectResult(RequestReservationCommand sut, int newQuantity) { RequestReservationCommand actual = sut.WithQuantity(newQuantity); sut.AsSource().OfLikeness<RequestReservationCommand>() .With(d => d.Quantity).EqualsWhen((s, d) => d.Quantity == newQuantity) .Without(d => d.Id) .ShouldEqual(actual); }