Example #1
0
 public NotificationAssessmentStatusTests()
 {
     notificationId         = new Guid("C4C62654-048C-45A2-BF7F-9837EFCF328F");
     notificationAssessment = new NotificationAssessment(notificationId);
     progressService        = A.Fake <INotificationProgressService>();
     A.CallTo(() => progressService.IsComplete(notificationId)).Returns(true);
 }
 public NotificationAssessmentStatusTests()
 {
     notificationId = new Guid("C4C62654-048C-45A2-BF7F-9837EFCF328F");
     notificationAssessment = new NotificationAssessment(notificationId);
     progressService = A.Fake<INotificationProgressService>();
     A.CallTo(() => progressService.IsComplete(notificationId)).Returns(true);
 }
Example #3
0
        public void Submit(INotificationProgressService progressService)
        {
            if (!progressService.IsComplete(NotificationApplicationId))
            {
                throw new InvalidOperationException(string.Format("Cannot submit an incomplete notification: {0}", NotificationApplicationId));
            }

            stateMachine.Fire(Trigger.Submit);
        }
 public NotificationApplicationOverviewRepository(
     IwsContext db,
     INotificationChargeCalculator chargeCalculator,
     INotificationProgressService progressService,
     INotificationApplicationAuthorization authorization)
 {
     this.db = db;
     this.chargeCalculator = chargeCalculator;
     this.progressService = progressService;
     this.authorization = authorization;
 }
 public NotificationApplicationOverviewRepository(
     IwsContext db,
     INotificationChargeCalculator chargeCalculator,
     INotificationProgressService progressService,
     INotificationApplicationAuthorization authorization)
 {
     this.db = db;
     this.chargeCalculator = chargeCalculator;
     this.progressService  = progressService;
     this.authorization    = authorization;
 }
        public SubmitNotificationHandlerTests()
        {
            context = new TestIwsContext();
            progressService = A.Fake<INotificationProgressService>();

            var assessment = new NotificationAssessment(notificationId);

            var repo = A.Fake<INotificationAssessmentRepository>();
            A.CallTo(() => repo.GetByNotificationId(notificationId)).Returns(assessment);

            context.NotificationAssessments.Add(assessment);
            A.CallTo(() => progressService.IsComplete(notificationId)).Returns(true);

            handler = new SubmitNotificationHandler(context, progressService, repo);
            message = new SubmitNotification(notificationId);
        }
Example #7
0
        public SubmitNotificationHandlerTests()
        {
            context         = new TestIwsContext();
            progressService = A.Fake <INotificationProgressService>();

            var assessment = new NotificationAssessment(notificationId);

            var repo = A.Fake <INotificationAssessmentRepository>();

            A.CallTo(() => repo.GetByNotificationId(notificationId)).Returns(assessment);

            context.NotificationAssessments.Add(assessment);
            A.CallTo(() => progressService.IsComplete(notificationId)).Returns(true);

            handler = new SubmitNotificationHandler(context, progressService, repo);
            message = new SubmitNotification(notificationId);
        }
Example #8
0
 public SubmitNotificationHandler(IwsContext context, INotificationProgressService progressService, INotificationAssessmentRepository repository)
 {
     this.context         = context;
     this.progressService = progressService;
     this.repository      = repository;
 }
        public void Submit(INotificationProgressService progressService)
        {
            if (!progressService.IsComplete(NotificationApplicationId))
            {
                throw new InvalidOperationException(string.Format("Cannot submit an incomplete notification: {0}", NotificationApplicationId));
            }

            stateMachine.Fire(Trigger.Submit);
        }
Example #10
0
 public NotificationApplicationCompletionProgressMap(INotificationProgressService progressService)
 {
     this.progressService = progressService;
 }
Example #11
0
 public GetNotificationProgressInfoHandler(INotificationProgressService progressService)
 {
     this.progressService = progressService;
 }