public void Provider_Should_Get_Root_Directory()
        {
            var provider = new SqlFileSystemProvider(GetSqlServerDataProvider());

            var directory = provider.RootDirectory;

            Assert.IsNotNull(directory);
            Assert.AreEqual(VirtualPath.RootPath, directory.Path);
            Assert.IsEmpty(directory.Name);
        }
        public void Provider_Should_Get_Directory()
        {
            var provider = new SqlFileSystemProvider(GetSqlServerDataProvider());
            var directoryname = "Test";
            var virtualDirectoryPath = "/" + directoryname + "/";

            var directory = provider.GetDirectory(new VirtualPath(virtualDirectoryPath));

            Assert.IsNotNull(directory);
            Assert.AreEqual(virtualDirectoryPath, directory.Path.FullPath);
            Assert.AreEqual(directoryname, directory.Name);
        }
Example #3
0
        public void Root_Directory_Should_Have_Directories()
        {
            var provider = new SqlFileSystemProvider(FileSystemProviderTests.GetSqlServerDataProvider());
            var root = provider.RootDirectory;

            var directories = root.SubDirectories;

            Assert.IsNotNull(directories);
            Assert.IsNotEmpty(directories as ICollection);
            foreach (var directory in directories)
            {
                Assert.IsNotNullOrEmpty(directory.Name);
            }
        }
Example #4
0
        public void Directory_Subdirectories_Should_Have_Subdirectories()
        {
            var provider = new SqlFileSystemProvider(FileSystemProviderTests.GetSqlServerDataProvider());
            var root = provider.RootDirectory;

            var directories = root.SubDirectories;

            foreach (var directory in directories)
            {
                var subdirectories = directory.SubDirectories;
                Assert.IsNotNull(subdirectories);
                foreach (var subdirectory in subdirectories)
                {
                    Assert.IsNotNullOrEmpty(subdirectory.Name);
                }
            }
        }
        public void Provider_Should_get_Sub_Directories()
        {
            var provider = new SqlFileSystemProvider(GetSqlServerDataProvider());
            var directoryname = "Test";
            var subdirectoryname = "SubTest";
            var virtualDirectoryPath = "/" + directoryname + "/";
            var virtualSubDirectoryPath = "/" + directoryname + "/" + subdirectoryname + "/";

            var directory = provider.GetDirectory(new VirtualPath(virtualDirectoryPath));
            var directories = provider.GetDirectories(directory);

            Assert.IsNotNull(directories);
            Assert.IsNotEmpty(directories as ICollection);
            Assert.AreEqual(1, directories.Count);
            Assert.AreEqual(subdirectoryname, directories[0].Name);
            Assert.AreEqual(virtualSubDirectoryPath, directories[0].Path.FullPath);
        }
 public void Should_Create()
 {
     var provider = new SqlFileSystemProvider(GetSqlServerDataProvider());
 }