public void Test_Execute_Cancel() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); CancelOrderOperation op = new CancelOrderOperation(); order.Cancel(new OrderCancelInfo()); order.UpdateStatus(); Assert.AreEqual(OrderStatus.CA, order.Status); op.Execute(order, info); }
public void Test_Execute() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); CancelOrderOperation op = new CancelOrderOperation(); Assert.AreEqual(OrderStatus.SC, order.Status); op.Execute(order, info); order.UpdateStatus(); Assert.AreEqual(OrderStatus.CA, order.Status); }
public void Test_Execute_InProgress() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); CancelOrderOperation op = new CancelOrderOperation(); Procedure procedure = new Procedure(); ModalityProcedureStep step = new ModalityProcedureStep(procedure, "New modality.", new Healthcare.Modality()); order.AddProcedure(procedure); step.Start(new Staff()); Assert.AreEqual(OrderStatus.IP, order.Status); op.Execute(order, info); }