コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }