public void PassesIssueSummaryToNewGroup() { nextProvider.Group = CreateSecondaryGroup(); var probe = new IssueSummary(); group.AddIssue(probe); Assert.IsTrue(((IIssueTreeNode)nextProvider.Group).Children.Contains(probe), "The issue was not added to the new group."); }
public void PassesIssueSummaryToExistingGroup() { // "prime" the tree of groups nextProvider.Group = CreateSecondaryGroup(); group.AddIssue(new IssueSummary()); var probe = new IssueSummary(); group.AddIssue(probe); Assert.IsTrue(((IIssueTreeNode)nextProvider.Group).Children.Contains(probe), "The issue was not added to the existing group."); }
public void SetUp() { Provider = CreateProviderInstance(); summary = new IssueSummary { IssueDescription = "IssueDescription", IssueMarker = IssueMarker.None, ProviderCategory = "ProviderCategory", ProviderDescription = "ProviderDescription", ProviderTitle = "ProviderTitle", Region = new DomRegion("fileName", new TextLocation(2, 3), new TextLocation(2, 10)), Severity = Severity.None }; }
public void LeavesFilteredCorrectly() { var leafGroup = new IssueGroup(NullGroupingProvider.Instance, "sut"); IIssueTreeNode leafNode = leafGroup; var issue = new IssueSummary(); leafGroup.AddIssue(issue); var children = leafNode.Children; Assert.That(children.Contains(issue)); Assert.AreEqual(1, children.Count, "The group contained too many issues."); }
public void NoEventsCalledForIssuesAddedBeforeProcessingEnabled() { var localGroup = new IssueGroup(null, "sut"); IIssueTreeNode localNode = localGroup; localNode.ChildAdded += Forbidden <IssueTreeNodeEventArgs> ("node.ChildAdded"); var issue = new IssueSummary(); localGroup.AddIssue(issue); var children = localNode.Children; Assert.That(children.Contains(issue)); Assert.AreEqual(1, children.Count, "The number of children was incorrect."); }
public void PassesIssueSummaryToNewGroupDuringEnableProcessing() { var disabledGroup = new IssueGroup(nextProvider, "sut"); // "prime" the tree of groups nextProvider.Group = CreateSecondaryGroup(); var probe = new IssueSummary(); disabledGroup.AddIssue(probe); disabledGroup.EnableProcessing(); var issues = ((IIssueTreeNode)nextProvider.Group).Children; Assert.IsTrue(issues.Contains(probe), "The issue was not added to the new group."); }
protected override string GetGroupName(IssueSummary issue) { return(issue.ProviderCategory); }
public IssueGroup GetIssueGroup(IssueSummary issue) { GetIssueGroupCalled = true; return(Group); }
protected override string GetGroupingKey(IssueSummary issue) { return(issue.ProviderTitle); }