Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }