Exemplo n.º 1
0
        public void Test_CreateIf_When_Conditon_Fails()
        {
            //arrange
            string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Test4");

            //act
            Dir.CreateIf(path, () => false);

            //assert
            Assert.IsTrue(!Directory.Exists(path));
        }
Exemplo n.º 2
0
        public void Test_CreateIf_When_Conditon_Satisfies()
        {
            //arrange
            string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Test3");

            //act
            Dir.CreateIf(path, () => true);

            //assert
            Assert.IsTrue(Directory.Exists(path));

            Directory.Delete(path);
        }