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);
        }
Пример #2
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);
        }