예제 #1
0
 /// <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 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);
            }
        }
        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 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);
            }
        }
예제 #5
0
 /// <summary>
 /// Get Retrospective filtered by the criteria specified in the passed in filter.
 /// </summary>
 /// <param name="filter">Limit the items returned. If null, then all items returned.</param>
 /// <returns>ICollection of items as specified in the filter.</returns>
 public ICollection <Retrospective> Retrospectives(RetrospectiveFilter filter)
 {
     return(Get <Retrospective>(filter ?? new RetrospectiveFilter()));
 }
 /// <summary>
 /// Get Retrospective in this Project filtered as specified in the passed in filter.
 /// </summary>
 /// <param name="filter">Criteria to filter on. Project will be set automatically. If null, all Retrospective in the project are returned.</param>
 /// <param name="includeSubprojects">Specifies whether to include items from sub project or not. This only adds open subprojects.</param>
 /// <returns>A readonly ICollection of Retrospective</returns>
 public ICollection <Retrospective> GetRetrospectives(RetrospectiveFilter filter, bool includeSubprojects)
 {
     return(Instance.Get.Retrospectives(WithThisProjectIncludedIn(filter, includeSubprojects)));
 }
 /// <summary>
 /// Get Retrospective in this Project filtered as specified in the passed in filter. Does not include subprojects.
 /// </summary>
 /// <param name="filter">Criteria to filter on. Project will be set automatically. If null, all Retrospective in the project are returned.</param>
 /// <returns>A readonly ICollection of Retrospective</returns>
 public ICollection <Retrospective> GetRetrospectives(RetrospectiveFilter filter)
 {
     return(GetRetrospectives(filter, false));
 }