public void WhenCalculatingForMemberNodeHasExpectedLinesOfCode(string code, int expected, SyntaxKind kind)
{
var text = string.Format(
@"namespace Testing
{{
public class TestClass {{
{0}
}}
}}",
code);
var syntaxTree = CSharpSyntaxTree.ParseText(text);
var root = syntaxTree
.GetRoot()
.DescendantNodes()
.First(c => c.IsKind(kind));
var loc = _analyzer.Calculate(root);
Assert.Equal(expected, loc);
}