/// <summary> /// A collection of Issues Identified in the Retrospective /// </summary> public ICollection<Issue> GetIssues(IssueFilter filter) { filter = filter ?? new IssueFilter(); filter.Retrospective.Clear(); filter.Retrospective.Add(this); return Instance.Get.Issues(filter); }
void TestPriority(Issue expected, Issue not, string expectedPriority) { IssueFilter filter = new IssueFilter(); filter.Project.Add(SandboxProject); filter.Priority.Add(expectedPriority); ResetInstance(); expected = Instance.Get.IssueByID(expected.ID); not = Instance.Get.IssueByID(not.ID); ICollection<Issue> results = SandboxProject.GetIssues(filter); Assert.IsTrue(FindRelated(expected, results), "Expected to find Issue that matched filter."); Assert.IsFalse(FindRelated(not, results), "Expected to NOT find Issue that doesn't match filter."); foreach (Issue result in results) Assert.AreEqual(expectedPriority, result.Priority.CurrentValue); }
/// <summary> /// A read-only collection of Issues owned by this member. /// </summary> public ICollection<Issue> GetOwnedIssues(IssueFilter filter) { filter = filter ?? new IssueFilter(); filter.Owner.Clear(); filter.Owner.Add(this); return Instance.Get.Issues(filter); }
[Test] public void RankOrder() { IssueFilter filter = new IssueFilter(); filter.OrderBy.Add("RankOrder"); Assert.Less(-1, Instance.Get.Issues(filter).Count); }
[Test] public void Owner() { Issue issue = SandboxProject.CreateIssue("Issue Owned By Andre"); Assert.IsNull(issue.Owner); Member andre = Instance.Get.MemberByID("Member:1000"); issue.Owner = andre; issue.Save(); IssueFilter filter = new IssueFilter(); filter.Owner.Add(andre); filter.Project.Add(SandboxProject); Assert.AreEqual(1, Instance.Get.Issues(filter).Count); }