Exemplo n.º 1
0
        private void PrepareTests()
        {
            if (Extra.IsTestDirExists())
            {
                Directory.Delete(Extra.TestDir, true);
            }

            Extra.CreateSomeDirsAndFilesForTests();
        }
Exemplo n.º 2
0
        public void CreatingAndClearingDirs()
        {
            bool status = false;

            if (Extra.IsTestDirExists())
            {
                Assert.Fail("Error in creating test dirs, dirs already exists");
            }

            Extra.CreateSomeDirsAndFilesForTests();

            Thread.Sleep(1000);

            status = DirectoryD.CleanDirectory(Extra.TestDir);

            Assert.AreEqual(status, true);

            Directory.Delete(Extra.TestDir);

            if (Extra.IsTestDirExists())
            {
                Assert.Fail("Error in deleting test dirs");
            }
        }