public void UsingStatementsMustNotBeNestedAnalyzer_Success() { ThisCodebase.MustConformTo( RoslynConvention.UsingStatementsMustNotBeNested()) .All(x => x.IsSatisfied) .Should() .BeTrue(); }
public void UsingStatementsMustNotBeNestedAnalyzer_FailesWhenFileHasUsingsInsideNamespace() { using (new TestSolution("TestSolution")) { ThisCodebase.MustConformTo( RoslynConvention.UsingStatementsMustNotBeNested()) .Should() .Contain(x => x.IsSatisfied == false && x.SubjectName.EndsWith("SplitNamespaces.cs")); } }