ArchiMetrics.CodeReview.Rules.Tests.Rules.Semantic.TooLowMaintainabilityIndexRuleTests.GivenATooLowMaintainabilityIndexRule.WhenMethodHasHighMaintainabilityThenReturnsNull C# (CSharp) Method

WhenMethodHasHighMaintainabilityThenReturnsNull() private method

private WhenMethodHasHighMaintainabilityThenReturnsNull ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
            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);
            }
        }
TooLowMaintainabilityIndexRuleTests.GivenATooLowMaintainabilityIndexRule