public void File_Folder_can_be_added_in_folder() { var container = new KataFolder("Parent"); var child = new KataFile("Child.txt"); container.Add(child); var child2 = new KataFolder("ChildFolder"); container.Add(child2); CollectionAssert.AreEquivalent(new List <IFileSystemNode> { child, child2 }, container.Items); }
public void GetTree_should_return_root_folder_name_When_it_s_empty() { var result = new KataFolder("Root").GetTree(); Assert.AreEqual("Root" + Environment.NewLine, result); }
public void Folder_should_have_a_name() { var folder = new KataFolder("MyFolder"); Assert.AreEqual("MyFolder", folder.Name); }