public void FindInDocumentVBCommentTest() { // Get Project object Project testProject = (Project)(extensibility.Solution.Projects.Item(2)); ProjectItem codeFile = testProject.ProjectItems.Item("Comment Test.vb"); ReadOnlyCollection <BaseHardCodedString> collection = BaseHardCodedString.FindAllInstancesInDocument(codeFile, "\"TestString\""); Assert.AreEqual(1, collection.Count, Messages.CountInvalid); }
public void FindInDocumentCSharpCommentTest() { // Get Project object Project testProject = (Project)(extensibility.Solution.Projects.Item(1)); ProjectItem codeFile = testProject.ProjectItems.Item("CommentTest.cs"); ReadOnlyCollection <BaseHardCodedString> collection = BaseHardCodedString.FindAllInstancesInDocument(codeFile, "\"Test String\""); Assert.AreEqual(2, collection.Count, Messages.CountInvalid); Assert.AreEqual(11, collection[0].StartingLine, Messages.MatchResultInvalid); Assert.AreEqual(11, collection[1].StartingLine, Messages.MatchResultInvalid); }