private NamespaceDeclarationSyntax GetNamespaceDecl(CInfo cInfo) { NamespaceDeclarationSyntax namespaceDecl = NamespaceDeclaration(QualifiedName( IdentifierName(cInfo.Namespace), IdentifierName("Tests"))); return(namespaceDecl); }
private SyntaxList <MemberDeclarationSyntax> GetMembers(CInfo cInfo) { var methods = new List <MemberDeclarationSyntax>(); foreach (string mName in cInfo.Methods) { methods.Add(GetMethodDec(mName)); } return(new SyntaxList <MemberDeclarationSyntax>(methods)); }
private SyntaxList <UsingDirectiveSyntax> GetUsings(CInfo cInfo) { var usings = new List <UsingDirectiveSyntax>() { UsingDirective(IdentifierName("System")), UsingDirective(IdentifierName("System.Collections.Generic")), UsingDirective(IdentifierName("System.Linq")), UsingDirective(IdentifierName("System.Text")), UsingDirective(IdentifierName("Microsoft.VisualStudio.TestTools.UnitTesting")), UsingDirective(IdentifierName(cInfo.Namespace)) }; return(new SyntaxList <UsingDirectiveSyntax>(usings)); }