Esempio n. 1
0
        public void Should_close_an_order_after_payment()
        {
            var order = new Order(_customer, _address);

            order.AddProduct(_membership);

            order.Pay(_paymentMethod);

            DateTimeAssert.Equal(DateTime.Now, order.ClosedAt.Value, TimeSpan.FromSeconds(1));
        }
Esempio n. 2
0
        public void Should_pay_an_order_and_register_the_date()
        {
            var order = new Order(_customer, _address);

            order.AddProduct(_membership);

            order.Pay(_paymentMethod);

            Assert.True(order.IsPaid);
            DateTimeAssert.Equal(DateTime.Now, order.Payment.PaidAt, TimeSpan.FromSeconds(1));
        }