Exemple #1
0
        public void TestMethodAssertFolderExists()
        {
            const string UnitTestDir = @"c:\temp\TestMethodAssertFolderExists";
            var          myLogger    = new Stf.Utilities.StfLogger {
                FileName = @"c:\temp\unittestlogger_AssertFolderExists.html"
            };
            var myAsserts = new StfAssert(myLogger);

            myAsserts.EnableNegativeTesting = true;

            if (Directory.Exists(UnitTestDir))
            {
                Directory.Delete(UnitTestDir);
            }

            Assert.IsFalse(myAsserts.AssertFolderExists("TestStepName 1", UnitTestDir));

            var testDir = Directory.CreateDirectory(UnitTestDir);

            Assert.IsTrue(myAsserts.AssertFolderExists("TestStepName 2", UnitTestDir));
        }