Пример #1
0
 public void TestFindSubFolder()
 {
     ProjectNode projectNode = new ProjectNode(vsSolution, project.GUID);
     string parentFolder = "Folder" + Guid.NewGuid().ToString();
     string subFolderName = "subFolder1";
     Assert.IsNotNull(projectNode.FindSubfolder("\\" + parentFolder + "\\" + subFolderName + "\\" + subFolderName + "\\"));
     HierarchyNode parentFolderNode = projectNode.FindByName(parentFolder);
     Assert.IsNotNull(parentFolderNode);
     HierarchyNode subFolder1Node = parentFolderNode.FindByName(subFolderName);
     Assert.IsNotNull(subFolder1Node);
     HierarchyNode subFolder2Node = subFolder1Node.FindByName(subFolderName);
     Assert.IsNotNull(subFolder2Node);
 }
Пример #2
0
 public void TestCreateOrFindFolder()
 {
     ProjectNode projectNode = new ProjectNode(vsSolution, project.GUID);
     Assert.AreSame(projectNode, projectNode.FindOrCreateFolder("."));
     Assert.AreSame(projectNode, projectNode.FindSubfolder("."));
     Assert.AreSame(projectNode, projectNode.FindSubfolder(".\\."));
     Assert.AreSame(projectNode, projectNode.FindSubfolder(".\\.\\"));
     Assert.AreSame(projectNode, projectNode.FindSubfolder("\\"));
     Assert.AreSame(projectNode, projectNode.FindSubfolder("\\."));
     Assert.AreSame(projectNode, projectNode.FindSubfolder("\\.\\"));
     Assert.AreSame(projectNode, projectNode.FindSubfolder("\\.\\."));
 }