Exemplo n.º 1
0
 public void GivenThreeRoundsOfTheReviewHaveBeenCompleted()
 {
     var review = _reviewInfo.ReviewConfiguration;
     var reviewService = new ReviewService(_context.DatabaseContext, _fakeEmailService);
     for (int round = 0; round < 3; round++) {
         reviewService.StartReview(review.Id, review.Peers.First().EmailAddress);
         var feedbackService = new FeedbackService(_context.DatabaseContext);
         for (int i = 0; i < review.Peers.Count; i++) {
             feedbackService.SaveFeedback(review.Peers[i].EmailAddress, GetFeedback(review, (i + 5)%10 + 1));
         }
     }
 }
Exemplo n.º 2
0
        public void GivenTheFollowingAssessmentsHaveBeenMade(IEnumerable<AssessmentInfo> givenAssessments)
        {
            var assessmentInfos = givenAssessments as IList<AssessmentInfo> ?? givenAssessments.ToList();
            var review = _reviewInfo.ReviewConfiguration;
            var reviewService = new ReviewService(_context.DatabaseContext, _fakeEmailService);
            var feedbackService = new FeedbackService(_context.DatabaseContext);

            // first round
            reviewService.StartReview(review.Id, review.Peers.First().EmailAddress);
            foreach (var assessment in assessmentInfos) {
                SaveFeedback(feedbackService, review, assessment, assessment.PerformanceRound1, "performance");
                SaveFeedback(feedbackService, review, assessment, assessment.ProductivityRound1, "productivity");
            }

            // second round
            reviewService.StartReview(review.Id, review.Peers.First().EmailAddress);
            foreach (var assessment in assessmentInfos) {
                SaveFeedback(feedbackService, review, assessment, assessment.PerformanceRound2, "performance");
                SaveFeedback(feedbackService, review, assessment, assessment.ProductivityRound2, "productivity");
            }
        }