コード例 #1
0
        public void Given_i_have_logged_in_as_a_supervisor_then_the_fault_should_be_closed_and_the_work_order_should_be_marked_as_unsatisfactory()
        {
            var faultWithCompletedWorkOrder = new FaultWithCompletedWorkOrder();
            DomainEvents.Register<FaultClosed>(faultWithCompletedWorkOrder.Handle);
            var completedWorkOrder = new CompletedWorkOrder();
            DomainEvents.Register<WorkOrderMarkedAsSatisfactory>(completedWorkOrder.Handle);

            completedWorkOrder.SignOff(faultWithCompletedWorkOrder);
            completedWorkOrder.IsSatisfactory.ShouldBe(true);
            faultWithCompletedWorkOrder.FaultStatus.ShouldBe(FaultStatus.Closed);
        }
コード例 #2
0
ファイル: CompletedWorkOrder.cs プロジェクト: Eyakem/RNM
 public void SignOff(FaultWithCompletedWorkOrder fault)
 {
     DomainEvents.Raise(new WorkOrderMarkedAsSatisfactory(Id, true));
     fault.CloseFault();
 }