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);
        }
Exemplo n.º 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);
        }
        public void SendNotification(SubmitNotification submitNotification)
        {
            //if (string.IsNullOrEmpty(submitNotification.sendId))
            //    throw new CCException("非法人员[通知]");
            //if (submitNotification.relatedId<=0)
            //    throw new CCException("通知-关键数据不完整");

            //switch (submitNotification.notificationType)
            //{
            //    case NotificationType.praize:
            //       // this.PraizeNotification(submitNotification);
            //        break;
            //    case NotificationType.reply:
            //        break;
            //    case NotificationType.comment:
            //        break;
            //}
        }