コード例 #1
0
        public FinancialGuaranteeTests()
        {
            FinancialGuaranteeCollection = new FinancialGuaranteeCollection(NotificationId);
            FinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);

            CompletedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.Status, FinancialGuaranteeStatus.ApplicationComplete, CompletedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.ReceivedDate, AnyDate, CompletedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.CompletedDate, CompletedDate, CompletedFinancialGuarantee);

            ApprovedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.Status, FinancialGuaranteeStatus.Approved, ApprovedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.Decision, FinancialGuaranteeDecision.Approved, ApprovedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.ReceivedDate, AnyDate, ApprovedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.CompletedDate, CompletedDate, ApprovedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.DecisionDate, AfterCompletionDate, ApprovedFinancialGuarantee);

            RefusedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.Status, FinancialGuaranteeStatus.Refused, RefusedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.Decision, FinancialGuaranteeDecision.Refused, RefusedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.ReceivedDate, AnyDate, RefusedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.CompletedDate, CompletedDate, RefusedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.DecisionDate, AfterCompletionDate, RefusedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.RefusalReason, AnyString, RefusedFinancialGuarantee);

            ReceivedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.Status, FinancialGuaranteeStatus.ApplicationReceived, ReceivedFinancialGuarantee);
            ObjectInstantiator<FinancialGuarantee>.SetProperty(fg => fg.ReceivedDate, AnyDate, ReceivedFinancialGuarantee);

            Dispatcher = A.Fake<IDeferredEventDispatcher>();
            DomainEvents.Dispatcher = Dispatcher;
        }
コード例 #2
0
        public FinancialGuaranteeTests()
        {
            FinancialGuaranteeCollection = new FinancialGuaranteeCollection(NotificationId);
            FinancialGuarantee           = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);

            CompletedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.Status, FinancialGuaranteeStatus.ApplicationComplete, CompletedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.ReceivedDate, AnyDate, CompletedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.CompletedDate, CompletedDate, CompletedFinancialGuarantee);

            ApprovedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.Status, FinancialGuaranteeStatus.Approved, ApprovedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.Decision, FinancialGuaranteeDecision.Approved, ApprovedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.ReceivedDate, AnyDate, ApprovedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.CompletedDate, CompletedDate, ApprovedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.DecisionDate, AfterCompletionDate, ApprovedFinancialGuarantee);

            RefusedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.Status, FinancialGuaranteeStatus.Refused, RefusedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.Decision, FinancialGuaranteeDecision.Refused, RefusedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.ReceivedDate, AnyDate, RefusedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.CompletedDate, CompletedDate, RefusedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.DecisionDate, AfterCompletionDate, RefusedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.RefusalReason, AnyString, RefusedFinancialGuarantee);

            ReceivedFinancialGuarantee = FinancialGuaranteeCollection.AddFinancialGuarantee(AnyDate);
            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.Status, FinancialGuaranteeStatus.ApplicationReceived, ReceivedFinancialGuarantee);

            ObjectInstantiator <FinancialGuarantee> .SetProperty(fg => fg.ReceivedDate, AnyDate, ReceivedFinancialGuarantee);

            Dispatcher = A.Fake <IDeferredEventDispatcher>();
            DomainEvents.Dispatcher = Dispatcher;
        }
コード例 #3
0
 public EventDispatcherRequestHandlerDecorator(IRequestHandler <TRequest, TResponse> inner,
                                               IDeferredEventDispatcher eventDispatcher)
 {
     this.inner           = inner;
     this.eventDispatcher = eventDispatcher;
 }