public async Task WhenMethodHasHighMaintainabilityThenReturnsNull()
{
var solution = CreateSolution(HighMaintainability);
var classDeclaration = (from p in solution.Projects
from d in p.Documents
let model = d.GetSemanticModelAsync().Result
let root = d.GetSyntaxRootAsync().Result
from n in root.DescendantNodes().OfType<MethodDeclarationSyntax>()
select new
{
semanticModel = model,
node = n
})
.First();
var result = await _rule.Evaluate(classDeclaration.node, classDeclaration.semanticModel, solution);
Assert.Null(result);
}
}