本文整理汇总了C#中Suite.AddSuite方法的典型用法代码示例。如果您正苦于以下问题:C# Suite.AddSuite方法的具体用法?C# Suite.AddSuite怎么用?C# Suite.AddSuite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Suite
的用法示例。
在下文中一共展示了Suite.AddSuite方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: adding_a_suite_makes_the_parent_to_child_relationship
public void adding_a_suite_makes_the_parent_to_child_relationship()
{
var parent = new Suite("parent");
var child = new Suite("child");
parent.AddSuite(child);
child.Parent.ShouldBeTheSameAs(parent);
parent.Contains(child).ShouldBeTrue();
}
示例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);
}
}
示例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);
}
}
示例4: create_a_directory
public void create_a_directory()
{
var project = new Project
{
BinaryFolder = string.Empty,
ProjectFolder = "",
TestFolder = ""
};
if (Directory.Exists("NewSuite")) Directory.Delete("NewSuite", true);
var suite = new Suite("NewSuite");
project.CreateDirectory(suite);
Directory.Exists("NewSuite").ShouldBeTrue();
var childSuite = new Suite("Child");
suite.AddSuite(childSuite);
project.CreateDirectory(childSuite);
Directory.Exists("NewSuite\\Child").ShouldBeTrue();
}
示例5: get_path_if_has_suite_parent
public void get_path_if_has_suite_parent()
{
var top = new Suite("top");
var child = new Suite("child");
top.AddSuite(child);
child.GetPath().Locator.ShouldEqual("top/child");
}
示例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);
}
}