public void When_CancelCheckedOut_ThrowsInvalidStateException() { var initialEvents = InitialEvents.ToList(); initialEvents.Add(new BasketCheckedOut(id, new List <OrderLine>(), shippingAddress)); Given(initialEvents.ToArray()); WhenThrows <CancelBasket, InvalidStateException>(new CancelBasket(id)); }
public void When_CheckOutCheckedOut_NothingHappens() { var initialEvents = InitialEvents.ToList(); initialEvents.Add(new BasketCheckedOut(id, OrderLines, shippingAddress)); Given(initialEvents.ToArray()); When(new CheckOutBasket(id, shippingAddress)); Then(new IEvent[] { }); }
public void When_CancelCancelled_NothingHappens() { var initialEvents = InitialEvents.ToList(); initialEvents.Add(new BasketCancelled(id)); Given(initialEvents.ToArray()); When(new CancelBasket(id)); Then(new IEvent[] { }); }