public void Should_Store_The_Order_For_Later_Payment() { var fakeOrdersHandler = new FakeOrdersHandler(); var orderStore = new FakeOrdersStore(); var cashier = new Cashier(fakeOrdersHandler, orderStore); cashier.Handle(SampleOrders.CreateSampleOrder()); Assert.That(orderStore.HasOrderForTable(123)); }
public void Should_Pass_The_Paid_Order_Forward() { var fakeOrdersHandler = new FakeOrdersHandler(); var orderStore = new FakeOrdersStore(); var cashier = new Cashier(fakeOrdersHandler, orderStore); cashier.Handle(SampleOrders.CreateSampleOrder()); cashier.PayFor(123); Assert.That(fakeOrdersHandler.OrdersToBeHandled.Count, Is.EqualTo(1)); }
public void Should_Mark_Order_As_Paid() { var fakeOrdersHandler = new FakeOrdersHandler(); var orderStore = new FakeOrdersStore(); var cashier = new Cashier(fakeOrdersHandler, orderStore); cashier.Handle(SampleOrders.CreateSampleOrder()); cashier.PayFor(123); Assert.That(fakeOrdersHandler.OrdersToBeHandled[0].Paid); }