Exemplo n.º 1
0
        public void DirectoryExists_GivenFolderDoesNotExist_ShouldReturnTrue()
        {
            //---------------Set up test pack-------------------
            var fileSystemAdapter = new FileSystemAdapter();
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var folderExists = fileSystemAdapter.DirectoryExists(Guid.NewGuid().ToString());

            //---------------Test Result -----------------------
            Assert.IsFalse(folderExists);
        }
Exemplo n.º 2
0
        public void DirectoryExists_GivenFolderExists_ShouldReturnTrue()
        {
            using (var sandboxPath = new SandboxPath())
            {
                //---------------Set up test pack-------------------
                var fileSystemAdapter = new FileSystemAdapter();
                //---------------Assert Precondition----------------

                //---------------Execute Test ----------------------
                var folderExists = fileSystemAdapter.DirectoryExists(sandboxPath.FullPath);
                //---------------Test Result -----------------------
                Assert.IsTrue(folderExists);
            }
        }
Exemplo n.º 3
0
        public void CreateDirectory_ShouldCreateDirectory()
        {
            using (var sandboxPath = new SandboxPath())
            {
                //---------------Set up test pack-------------------
                var fileSystemAdapter = new FileSystemAdapter();
                //---------------Assert Precondition----------------

                //---------------Execute Test ----------------------
                var newDirectory = Path.Combine(sandboxPath.FullPath, Guid.NewGuid().ToString());
                fileSystemAdapter.CreateDirectory(newDirectory);
                //---------------Test Result -----------------------
                Assert.IsTrue(fileSystemAdapter.DirectoryExists(newDirectory));
            }
        }