public void CreateByCopy_WithRelativePath_CreatesAndCleanups() { DirectoryHandle dirhandle; using ( dirhandle = TempDirectoriesFactory.CreateByCopy(Path.Combine(LocalTestResourcePath, "SampleSourceDir"))) { Expect(dirhandle.Exists, "Directory not created"); Expect(dirhandle.GetFiles().Count(), GreaterThan(0), "No files in temp directory"); } Expect(!dirhandle.Exists, "Directory not deleted"); }
public void CreateByCopy_WithAbsolutePath_CreatesAndCleanups() { DirectoryHandle dirhandle; using ( dirhandle = TempDirectoriesFactory.CreateByCopy(Path.Combine(TestContext.CurrentContext.TestDirectory, "TempDirectoriesTests", "SampleSourceDir"))) { Expect(dirhandle.Exists, "Directory not created"); Expect(dirhandle.GetFiles().Count(), GreaterThan(0), "No files in temp directory"); } Expect(!dirhandle.Exists, "Directory not deleted"); }