public static MemberDeclarationSyntax CreateMockAsField(this TypeSyntax type) { var typeName = type.GetTypeName(); return(ParseMemberDeclaration($"private readonly Mock<{typeName}> {typeName.ToMemberName()} = new Mock<{typeName}>();")); }