当前位置: 首页>>代码示例>>C#>>正文


C# Suite.AddTest方法代码示例

本文整理汇总了C#中Suite.AddTest方法的典型用法代码示例。如果您正苦于以下问题:C# Suite.AddTest方法的具体用法?C# Suite.AddTest怎么用?C# Suite.AddTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Suite的用法示例。


在下文中一共展示了Suite.AddTest方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: adding_a_test_to_a_suite_sets_the_suite_as_the_tests_parent

        public void adding_a_test_to_a_suite_sets_the_suite_as_the_tests_parent()
        {
            var suite = new Suite("Suite 1");
            var test = new Test("Test 1");

            suite.AddTest(test);

            test.Parent.ShouldEqual(suite);
            suite.Contains(test).ShouldBeTrue();
        }
开发者ID:adymitruk,项目名称:storyteller,代码行数:10,代码来源:SuiteTester.cs

示例2: loadTestsInFolder

        private void loadTestsInFolder(string folder, Suite parent)
        {
            foreach (string file in _system.GetFiles(folder, "xml"))
            {
                Test test = LazyTestXmlReader.ReadFromFile(file);
                parent.AddTest(test);
            }

            // load the tests from the sub folders
            foreach (string subFolder in _system.GetSubFolders(folder))
            {
                string name = Path.GetFileName(subFolder);
                var child = parent is Hierarchy ? new WorkspaceSuite(name){Filter = _project.WorkspaceFor(name)} : new Suite(name);
                parent.AddSuite(child);

                loadTestsInFolder(subFolder, child);
            }
        }
开发者ID:abombss,项目名称:storyteller,代码行数:18,代码来源:HierarchyLoader.cs

示例3: loadTestsInFolder

        private void loadTestsInFolder(string folder, Suite parent)
        {
            foreach (string file in _system.GetFiles(folder, "xml"))
            {
                Test test = LazyTestXmlReader.ReadFromFile(file);
                test.SetParent(parent);

                parent.AddTest(test);
            }

            // load the tests from the sub folders
            foreach (string subFolder in _system.GetSubFolders(folder))
            {
                string name = Path.GetFileName(subFolder);
                var child = new Suite(name) {Parent = parent};

                parent.AddSuite(child);
                loadTestsInFolder(subFolder, child);
            }
        }
开发者ID:GaryLCoxJr,项目名称:StoryTeller2,代码行数:20,代码来源:HierarchyLoader.cs

示例4: get_path_with_parent

        public void get_path_with_parent()
        {
            var suite = new Suite("s1");
            var test = new Test("t1");

            suite.AddTest(test);

            test.GetPath().Locator.ShouldEqual("s1/t1");
        }
开发者ID:wbinford,项目名称:storyteller,代码行数:9,代码来源:TestTester.cs

示例5: return_the_workspace_filter_from_the_ultimate_parent_suite

        public void return_the_workspace_filter_from_the_ultimate_parent_suite()
        {
            var workspaceSuite = new WorkspaceSuite("suite")
            {
                Filter = new WorkspaceFilter()
                {
                    Filters = new FixtureFilter[] { FixtureFilter.Namespace("NS1") }
                }
            };

            var test = new Test("something");
            var suite = new Suite("a suite");
            suite.AddTest(test);

            workspaceSuite.AddSuite(suite);

            test.GetWorkspace().ShouldBeTheSameAs(workspaceSuite.Filter);
        }
开发者ID:adymitruk,项目名称:storyteller,代码行数:18,代码来源:TestTester.cs

示例6: loadTestsInFolder

            private void loadTestsInFolder(string folder, Suite parent)
            {
                foreach (string file in _system.GetFiles(folder, "xml"))
                {
                    Test test = _reader.ReadFromFile(file);
                    parent.AddTest(test);
                }

                // load the tests from the sub folders
                foreach (string subFolder in _system.GetSubFolders(folder))
                {
                    var child = new Suite(Path.GetFileName(subFolder));
                    parent.AddSuite(child);

                    loadTestsInFolder(subFolder, child);
                }
            }
开发者ID:wbinford,项目名称:storyteller,代码行数:17,代码来源:Project.cs


注:本文中的Suite.AddTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。