public void Test_CanExecute() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); Assert.AreEqual(OrderStatus.SC, order.Status); Assert.IsFalse(op.CanExecute(order)); }
public void Test_Execute_Scheduling() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); Assert.AreEqual(OrderStatus.SC, order.Status); op.Execute(order, info); }
public void Test_Execute_Scheduling() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); Assert.AreEqual(OrderStatus.SC, order.Status); op.Execute(order, info); }
public void Test_CanExecute_Cancel() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); order.Cancel(new OrderCancelInfo()); order.UpdateStatus(); Assert.AreEqual(OrderStatus.CA, order.Status); Assert.IsFalse(op.CanExecute(order)); }
public void Test_Execute() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); 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); }
public void Test_CanExecute_InProgress() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); 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); Assert.IsTrue(op.CanExecute(order)); }
public void Test_Execute() { Order order = new Order(); OrderCancelInfo info = new OrderCancelInfo(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); 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); }
public void Test_CanExecute_Complete() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); Procedure procedure = new Procedure(); ModalityProcedureStep step = new ModalityProcedureStep(procedure, "New modality.", new Healthcare.Modality()); order.AddProcedure(procedure); step.Start(new Staff()); procedure.Complete(DateTime.Now); order.UpdateStatus(); Assert.AreEqual(OrderStatus.CM, order.Status); Assert.IsFalse(op.CanExecute(order)); }
public void Test_CanExecute_Cancel() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); order.Cancel(new OrderCancelInfo()); order.UpdateStatus(); Assert.AreEqual(OrderStatus.CA, order.Status); Assert.IsFalse(op.CanExecute(order)); }
public void Test_CanExecute_Complete() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); Procedure procedure = new Procedure(); ModalityProcedureStep step = new ModalityProcedureStep(procedure, "New modality.", new Healthcare.Modality()); order.AddProcedure(procedure); step.Start(new Staff()); procedure.Complete(DateTime.Now); order.UpdateStatus(); Assert.AreEqual(OrderStatus.CM, order.Status); Assert.IsFalse(op.CanExecute(order)); }
public void Test_CanExecute() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); Assert.AreEqual(OrderStatus.SC, order.Status); Assert.IsFalse(op.CanExecute(order)); }
public void Test_CanExecute_InProgress() { Order order = new Order(); DiscontinueOrderOperation op = new DiscontinueOrderOperation(); 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); Assert.IsTrue(op.CanExecute(order)); }