Esempio n. 1
0
        public void Folder_Is_Null_For_Creation()
        {
            string path           = null;
            var    mockFileSystem = new MockFileSystem();
            var    sut            = new FolderManager(mockFileSystem);

            Assert.That(() => sut.CreateFolder(path), Throws.TypeOf <ArgumentNullException>());
        }
Esempio n. 2
0
        public void Successfully_Folder_Creation()
        {
            var path           = @"C:\SourceFiles\file.txt";
            var mockFileSystem = new MockFileSystem();
            var sut            = new FolderManager(mockFileSystem);

            sut.CreateFolder(path);

            Assert.That(mockFileSystem.Directory.Exists(path), Is.True);
        }
Esempio n. 3
0
        public void Folder_Has_Been_Already_Exists_For_Creation()
        {
            var path           = @"C:\SourceFiles\file.txt";
            var mockFileSystem = new MockFileSystem();

            mockFileSystem.AddDirectory(path);
            var sut = new FolderManager(mockFileSystem);

            Assert.That(() => sut.CreateFolder(path), Throws.TypeOf <ArgumentException>());
        }