public void CanGetHalsteadMetricsForArbitrarySnippet() { const string Code = @"return ""x"";"; var root = CSharpSyntaxTree.ParseText(Code).GetRoot(); var metrics = new SyntaxMetricsCalculator().Calculate(root); Assert.NotNull(metrics); }