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(); }
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"); }
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(); }
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); } }
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); } }
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(); }
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 = parent is Hierarchy ? new WorkspaceSuite(name) { Filter = _project.WorkspaceFor(name) } : new Suite(name); child.Parent = parent; parent.AddSuite(child); loadTestsInFolder(subFolder, child); } }
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); } }