AddChildSuite() public method

public AddChildSuite ( Suite newSuite ) : void
newSuite Suite
return void
        public BatchRunRequestTester()
        {
            childSuite1 = new Suite
            {
                name = "Child Suite 1",
                Specifications = new[]
                {
                    new Specification {name = "Spec 1a", Lifecycle = Lifecycle.Acceptance, Tags = {"tag1", "tag2"}},
                    new Specification {name = "Spec 1b", Lifecycle = Lifecycle.Regression, Tags = {"tag2"}}
                }
            };

            childSuite2 = new Suite
            {
                name = "Child Suite 2",
                Specifications = new[]
                {
                    new Specification
                    {
                        name = "Spec 2a",
                        Lifecycle = Lifecycle.Acceptance,
                        Tags = {"tag1", "tag2", "tag3"}
                    },
                    new Specification {name = "Spec 2b", Lifecycle = Lifecycle.Regression, Tags = {"tag4"}}
                }
            };

            theTopSuite = new Suite
            {
                Specifications = new Specification[0]
            };

            theTopSuite.AddChildSuite(childSuite1);
            theTopSuite.AddChildSuite(childSuite2);

            theRequest = new BatchRunRequest {Lifecycle = Lifecycle.Any};
        }
示例#2
0
        public static Suite ReadSuite(string folder)
        {
            var suite = new Suite
            {
                name           = Path.GetFileName(folder),
                Specifications =
                    FileSystem.FindFiles(folder, FileSet.Shallow("*.md")).Select(MarkdownReader.ReadFromFile).ToArray(),
                Folder = folder
            };

            foreach (var directory in FileSystem.ChildDirectoriesFor(folder))
            {
                suite.AddChildSuite(ReadSuite(directory));
            }

            return(suite);
        }
        public static Suite ReadSuite(string folder)
        {
            var suite = new Suite
            {
                name = Path.GetFileName(folder),
                Specifications =
                    FileSystem.FindFiles(folder, FileSet.Shallow("*.md")).Select(MarkdownReader.ReadFromFile).ToArray(),
                Folder = folder
            };

            foreach (var directory in FileSystem.ChildDirectoriesFor(folder))
            {
                suite.AddChildSuite(ReadSuite(directory));
            }

            return suite;
        }