public void Depth1Test() { string[] args = { RootFolderPath, "--depth=1" }; _settings.Init(args); NodeCreator nodeCreator = new NodeCreator(_settings); Node node = nodeCreator.CreateTreeNode(); Assert.IsTrue(node.Children[5].Children.Count == 0); }
public void SortBySizeDescendingTest() { string[] args = { RootFolderPath, "-os", "-do" }; _settings.Init(args); NodeCreator nodeCreator = new NodeCreator(_settings); Node node = nodeCreator.CreateTreeNode(); Assert.IsTrue(node.Children[0].Name == "bac.txt"); Assert.IsTrue(node.Children[1].Name == "abc.txt"); }
public void SortByCreationDateAscendingTest() { string[] args = { RootFolderPath, "-oc" }; _settings.Init(args); NodeCreator nodeCreator = new NodeCreator(_settings); Node node = nodeCreator.CreateTreeNode(); Assert.IsTrue(node.Children[0].Name == "abc.txt"); Assert.IsTrue(node.Children[1].Name == "bac.txt"); Assert.IsTrue(node.Children[2].Name == "A"); Assert.IsTrue(node.Children[3].Name == "B"); Assert.IsTrue(node.Children[4].Name == "C"); Assert.IsTrue(node.Children[5].Name == "V1"); }