ArchiMetrics.Analysis.Tests.SemanticAnalyzerTests.DoesNotSuggestAlreadyStaticMethods C# (CSharp) Method

DoesNotSuggestAlreadyStaticMethods() private method

private DoesNotSuggestAlreadyStaticMethods ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
		public async Task DoesNotSuggestAlreadyStaticMethods()
		{
			const string Code = @"namespace abc
{
	using System;

	public class MyClass
	{
		public static int Foo()
		{
			return 5;
		}
	}
}";
			var solution = CreateSolution(Code);
			var doc = solution.Projects.First().Documents.First();

			var model = await doc.GetSemanticModelAsync();
			var root = await doc.GetSyntaxRootAsync();
			var type = root.DescendantNodes().OfType<TypeDeclarationSyntax>().First();
			var analyzer = new SemanticAnalyzer(model);
			var staticMethods = analyzer.GetPossibleStaticMethods(type);

			Assert.Empty(staticMethods);
		}
	}