示例#1
0
        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[] { });
        }
示例#3
0
        public void When_CancelCancelled_NothingHappens()
        {
            var initialEvents = InitialEvents.ToList();

            initialEvents.Add(new BasketCancelled(id));
            Given(initialEvents.ToArray());
            When(new CancelBasket(id));
            Then(new IEvent[] { });
        }