public void ReturnsSymbolsForClasses() { var subject = new CSharpSourceSymbolProvider(); var file = MockFileWithContent("class Foo {}\nclass Bar {}"); var parsedSymbols = subject.SourceSymbolsFor(file); var expectedSymbols = new[] { new {DisplayText = "Foo", File = file, Line = 1, Column = 7}, new {DisplayText = "Bar", File = file, Line = 2, Column = 7} }; CollectionAssert.AreEquivalent( expectedSymbols, parsedSymbols.Select(_ => new { _.DisplayText, File = _.SourceFile, _.Line, _.Column })); }
public void ReturnsSymbolsForClasses() { var subject = new CSharpSourceSymbolProvider(); var file = MockFileWithContent("class Foo {}\nclass Bar {}"); var parsedSymbols = subject.SourceSymbolsFor(file); var expectedSymbols = new[] { new { DisplayText = "Foo", File = file, Line = 1, Column = 7 }, new { DisplayText = "Bar", File = file, Line = 2, Column = 7 } }; CollectionAssert.AreEquivalent( expectedSymbols, parsedSymbols.Select(_ => new { _.DisplayText, File = _.SourceFile, _.Line, _.Column })); }