Ejemplo n.º 1
0
        public void WillExecuteOnceForEachDescendantDirectory_ThreeGenerationsDeep()
        {
            DirectoryInfo subDirectory1      = TempDir.CreateSubdirectory("1");
            DirectoryInfo subSubDirectory1   = subDirectory1.CreateSubdirectory("1.1");
            DirectoryInfo subSubDirectory2   = subDirectory1.CreateSubdirectory("1.2");
            DirectoryInfo subSubSubDirectory = subSubDirectory2.CreateSubdirectory("1.2.1");

            DirectoryInfo subDirectory2 = TempDir.CreateSubdirectory("2");


            FileSystemNavigator navigator = NewLoggingNavigatorForTempDirectory;

            navigator.Walk();

            string[] expectedNames = FullNamesFor(TempDir.Root,
                                                  subDirectory1,
                                                  subSubDirectory1,
                                                  subSubDirectory2,
                                                  subSubSubDirectory,
                                                  subDirectory2);
            Assert.That(_loggedNames, Is.EqualTo(expectedNames));
        }
Ejemplo n.º 2
0
 public virtual void TestInitialise()
 {
     TempDir.CreateNew();
 }
Ejemplo n.º 3
0
 public virtual void TestCleanup()
 {
     ReleaseFileLocksIfAnyHeld();
     TempDir.Remove();
 }