private ExpectedValuesContainer SetupJim(TeamMemberViewModel jim)
        {
            var workitemsForJim = new WorkItemTestDataContainer(new[]
            {
                CreateBug().WithNormalLifecycle(jim, 3).WithETA(0, 5, 0),
                CreateTask().WithNormalLifecycle(jim, 5).WithETA(0, 2, 0)
            });

            SetupGetWorkitems(jim.Id, workitemsForJim.WorkItems);
            SetupClassify(workitemsForJim);

            var expectedValuesForJim = new ExpectedValuesContainer(new Dictionary <string, object>
            {
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.TotalResolved), 2 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.CompletedWithEstimates), workitemsForJim.ExpectedDuration },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.CompletedWithoutEstimates), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.EstimatedToComplete), workitemsForJim.ExpectedEstimatedToComplete },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.OriginalEstimated), workitemsForJim.ExpectedOriginalEstimate },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.WithOriginalEstimate), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.WithoutETA), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.TotalResolvedBugs), 1 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.TotalResolvedTasks), 1 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.MemberEmail), jim.Email },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.MemberName), jim.DisplayName },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.Details), 2 }
            });

            return(expectedValuesForJim);
        }
        private ExpectedValuesContainer SetupVictoria(TeamMemberViewModel victoria)
        {
            var workitemsForVictoria = new WorkItemTestDataContainer(new[]
            {
                CreateBug(),
                CreateTask()
            });

            SetupGetWorkitems(victoria.Id, workitemsForVictoria.WorkItems);
            SetupClassify(workitemsForVictoria);

            var expectedValuesForVictoria = new ExpectedValuesContainer(new Dictionary <string, object>
            {
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.TotalResolved), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.CompletedWithEstimates), workitemsForVictoria.ExpectedDuration },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.CompletedWithoutEstimates), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.EstimatedToComplete), workitemsForVictoria.ExpectedEstimatedToComplete },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.OriginalEstimated), workitemsForVictoria.ExpectedOriginalEstimate },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.WithOriginalEstimate), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.WithoutETA), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.TotalResolvedBugs), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.TotalResolvedTasks), 0 },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.MemberEmail), victoria.Email },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.MemberName), victoria.DisplayName },
                { nameof(AggregatedWorkitemsETAReport.IndividualETAReport.Details), 0 }
            });

            return(expectedValuesForVictoria);
        }
        private void VerifyReportFor(TeamMemberViewModel member, AggregatedWorkitemsETAReport report, ExpectedValuesContainer expectedValues)
        {
            var memberReport = report.IndividualReports.Single(r => r.MemberEmail == member.Email);

            memberReport.TotalResolved.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.TotalResolved)));
            memberReport.CompletedWithEstimates.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.CompletedWithEstimates)));
            memberReport.CompletedWithoutEstimates.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.CompletedWithoutEstimates)));
            memberReport.EstimatedToComplete.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.EstimatedToComplete)));
            memberReport.OriginalEstimated.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.OriginalEstimated)));
            memberReport.WithOriginalEstimate.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.WithOriginalEstimate)));
            memberReport.WithoutETA.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.WithoutETA)));
            memberReport.TotalResolvedBugs.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.TotalResolvedBugs)));
            memberReport.TotalResolvedTasks.Should().Be(expectedValues.GetValue <int>(nameof(memberReport.TotalResolvedTasks)));
            memberReport.MemberEmail.Should().Be(expectedValues.GetValue <string>(nameof(memberReport.MemberEmail)));
            memberReport.MemberName.Should().Be(expectedValues.GetValue <string>(nameof(memberReport.MemberName)));
            memberReport.Details.Should().HaveCount(expectedValues.GetValue <int>(nameof(memberReport.Details)));
        }