public void TeamTotalEstimate()
        {
            var storyA  = EntityFactory.CreateStory("Story A", SandboxProject);
            var defectB = EntityFactory.CreateDefect("Defect B", SandboxProject);

            storyA.Team  = SandboxTeam;
            defectB.Team = SandboxTeam;

            storyA.Estimate  = 5;
            defectB.Estimate = 10;

            storyA.Save();
            defectB.Save();

            var rogue = SandboxProject.CreateStory("Rogue");

            rogue.Team     = SandboxTeam;
            rogue.Estimate = 13.37;
            rogue.Save();
            rogue.Delete();

            Assert.AreEqual(15, SandboxTeam.GetTotalEstimate(null));
            Assert.AreEqual(15, SandboxTeam.GetTotalEstimate(new PrimaryWorkitemFilter()));
            Assert.AreEqual(5, SandboxTeam.GetTotalEstimate(new StoryFilter()));
            Assert.AreEqual(10, SandboxTeam.GetTotalEstimate(new DefectFilter()));
        }
        public void TeamTotalDetailEstimate()
        {
            var storyA  = EntityFactory.CreateStory("Story A", SandboxProject);
            var defectB = EntityFactory.CreateDefect("Defect B", SandboxProject);
            var task1   = storyA.CreateTask("Task 1");

            storyA.Team  = SandboxTeam;
            defectB.Team = SandboxTeam;

            task1.DetailEstimate   = 5;
            defectB.DetailEstimate = 10;

            task1.Save();
            storyA.Save();
            defectB.Save();

            var rogue = SandboxProject.CreateDefect("Rogue");

            rogue.Team           = SandboxTeam;
            rogue.DetailEstimate = 13.37;
            rogue.Save();
            rogue.Delete();

            Assert.AreEqual(15, SandboxTeam.GetTotalDetailEstimate(null));
            Assert.AreEqual(15, SandboxTeam.GetTotalDetailEstimate(new WorkitemFilter()));
            Assert.AreEqual(10, SandboxTeam.GetTotalDetailEstimate(new PrimaryWorkitemFilter()));
            Assert.AreEqual(null, SandboxTeam.GetTotalDetailEstimate(new StoryFilter()));
            Assert.AreEqual(10, SandboxTeam.GetTotalDetailEstimate(new DefectFilter()));
            Assert.AreEqual(5, SandboxTeam.GetTotalDetailEstimate(new SecondaryWorkitemFilter()));
            Assert.AreEqual(5, SandboxTeam.GetTotalDetailEstimate(new TaskFilter()));
            Assert.AreEqual(null, SandboxTeam.GetTotalDetailEstimate(new TestFilter()));
        }