public void DirectoryExists_ReturnsFalseWhenTheDirectoryPassedInDoesNotExist()
        {
            string path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "test");
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.False(pfs.DirectoryExists(path));
        }
        public void EnumerateDirectories_ReturnsAnEmptyCollectionIfTheParentDirectoryContainsNoDirectories()
        {
            string path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "test");

            Directory.CreateDirectory(path);
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.IsEmpty(pfs.EnumerateDirectories(path));
            Directory.Delete(path);
        }
        public void EnumerateDirectories_ReturnsAPopulatedCollectionWhenDirectoriesExistInTheParentDirectoryPassedIn()
        {
            string path = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);
            int    lastBackslashIndex = path.LastIndexOf('\\');

            path = path.Remove(lastBackslashIndex);
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.IsNotEmpty(pfs.EnumerateDirectories(path));
        }
        public void EnumerateDirectories_ThrowsAnArgumentExceptionWhenTheParentDirectoryPassedInIsAnEmptyString()
        {
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.Throws <ArgumentException>(() => pfs.EnumerateDirectories(String.Empty));
        }
        public void EnumerateDirectories_ThrowsAnArgumentNullExceptionWhenTheParentDirectoryIsNull()
        {
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.Throws <ArgumentNullException>(() => pfs.EnumerateDirectories(null));
        }
        public void DirectoryExists_ThrowsAnArgumentExceptionWhenThePathPassedInIsAnEmptyString()
        {
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.Throws <ArgumentException>(() => pfs.DirectoryExists(String.Empty));
        }
        public void DirectoryExists_ThrowsAnArgumentNullExceptionWhenThePathIsNull()
        {
            SourceCodeUpdaterPhysicalFileSystem pfs = new SourceCodeUpdaterPhysicalFileSystem();

            Assert.Throws <ArgumentNullException>(() => pfs.DirectoryExists(null));
        }