/// <summary> /// The Retrospectives assigned to this Team /// </summary> public ICollection<Retrospective> GetRetrospectives(RetrospectiveFilter filter) { filter = filter ?? new RetrospectiveFilter(); filter.Team.Clear(); filter.Team.Add(this); return Instance.Get.Retrospectives(filter); }
void TestIteration(Retrospective expected, Retrospective not, Iteration expectedIteration) { RetrospectiveFilter filter = new RetrospectiveFilter(); filter.Project.Add(SandboxProject); filter.Iteration.Add(expectedIteration); ResetInstance(); expectedIteration = (expectedIteration != null) ? Instance.Get.IterationByID(expectedIteration.ID) : null; expected = Instance.Get.RetrospectiveByID(expected.ID); not = Instance.Get.RetrospectiveByID(not.ID); ICollection<Retrospective> results = SandboxProject.GetRetrospectives(filter); Assert.IsTrue(FindRelated(expected, results), "Expected to find Retrospective that matched filter."); Assert.IsFalse(FindRelated(not, results), "Expected to NOT find Retrospective that doesn't match filter."); foreach (Retrospective result in results) Assert.AreEqual(expectedIteration, result.Iteration); }
void TestFacilitatedBy(Retrospective expected, Retrospective not, Member expectedFacilitator) { RetrospectiveFilter filter = new RetrospectiveFilter(); filter.Project.Add(SandboxProject); filter.FacilitatedBy.Add(expectedFacilitator); ResetInstance(); expectedFacilitator = (expectedFacilitator != null) ? Instance.Get.MemberByID(expectedFacilitator.ID) : null; expected = Instance.Get.RetrospectiveByID(expected.ID); not = Instance.Get.RetrospectiveByID(not.ID); ICollection<Retrospective> results = SandboxProject.GetRetrospectives(filter); Assert.IsTrue(FindRelated(expected, results), "Expected to find Retrospective that matched filter."); Assert.IsFalse(FindRelated(not, results), "Expected to NOT find Retrospective that doesn't match filter."); foreach (Retrospective result in results) Assert.AreEqual(expectedFacilitator, result.FacilitatedBy); }
void TestDate(Retrospective expected, Retrospective not, DateTime? expectedDate) { RetrospectiveFilter filter = new RetrospectiveFilter(); filter.Project.Add(SandboxProject); filter.Date.Add(expectedDate); ResetInstance(); expected = Instance.Get.RetrospectiveByID(expected.ID); not = Instance.Get.RetrospectiveByID(not.ID); ICollection<Retrospective> results = SandboxProject.GetRetrospectives(filter); Assert.IsTrue(FindRelated(expected, results), "Expected to find Retrospective that matched filter."); Assert.IsFalse(FindRelated(not, results), "Expected to NOT find Retrospective that doesn't match filter."); foreach (Retrospective result in results) Assert.AreEqual(expectedDate, result.Date); }