Ejemplo n.º 1
0
        public Tuple <string, List <string> > ResolveProjectFolderSpecs(string ProjectFolderSpec)
        {
            var TestAssembliesList        = "";
            var TestAssembliesDirectories = new List <string>();
            var ProjectFolderSpecInParent = FindFileInParent(new List <string> {
                ProjectFolderSpec
            });

            if (ProjectFolderSpecInParent != "")
            {
                if (ProjectFolderSpecInParent.Contains("*"))
                {
                    foreach (var projectFolder in Directory.GetDirectories(ProjectFolderSpecInParent))
                    {
                        TestAssembliesList += TestRunner.AppendProjectFolder(projectFolder);
                        if (!TestAssembliesDirectories.Contains(projectFolder + "\\bin\\Debug"))
                        {
                            TestAssembliesDirectories.Add(projectFolder + "\\bin\\Debug");
                        }
                    }
                }
                else
                {
                    TestAssembliesList += TestRunner.AppendProjectFolder(ProjectFolderSpecInParent);
                    if (!TestAssembliesDirectories.Contains(ProjectFolderSpecInParent + "\\bin\\Debug"))
                    {
                        TestAssembliesDirectories.Add(ProjectFolderSpecInParent + "\\bin\\Debug");
                    }
                }
                return(new Tuple <string, List <string> >(TestAssembliesList, TestAssembliesDirectories));
            }
            throw new Exception("Cannot resolve spec: " + ProjectFolderSpec);
        }