Exemplo n.º 1
0
        public void DifferentFileVersions()
        {
            using (new NFX.ApplicationModel.ServiceBaseApplication(null, LACONF.AsLaconicConfig()))
            {
                IList <WebDAV.Version> versions = WebDAV.GetVersions(SVN_ROOT, SVN_UNAME, SVN_UPSW).ToList();

                WebDAV.Version v1530 = versions.First(v => v.Name == "1530");
                WebDAV.Version v1531 = versions.First(v => v.Name == "1531");

                var client1530 = new WebDAV(SVN_ROOT, 0, SVN_UNAME, SVN_UPSW, version: v1530);

                var client1531 = new WebDAV(SVN_ROOT, 0, SVN_UNAME, SVN_UPSW, version: v1531);

                WebDAV.Directory root1530 = client1530.Root;
                WebDAV.Directory root1531 = client1531.Root;

                WebDAV.File file1530 = root1530.NavigatePath("trunk/Source/NFX.Web/IO/FileSystem/SVN/WebDAV.cs") as WebDAV.File;
                WebDAV.File file1531 = root1531.NavigatePath("trunk/Source/NFX.Web/IO/FileSystem/SVN/WebDAV.cs") as WebDAV.File;

                using (MemoryStream ms1530 = new MemoryStream())
                {
                    using (MemoryStream ms1531 = new MemoryStream())
                    {
                        file1530.GetContent(ms1530);
                        file1531.GetContent(ms1531);

                        Assert.AreNotEqual(ms1530.Length, ms1531.Length);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public static void FileContent()
        {
            InitCONSTS();

            WebDAV client = new WebDAV(ROOT, 0, UNAME, UPSW);

            WebDAV.Directory root = client.Root;

            WebDAV.File file = root.Children.First(c => c is WebDAV.File) as WebDAV.File;

            using (MemoryStream ms = new MemoryStream())
            {
                file.GetContent(ms);
            }
        }
Exemplo n.º 3
0
        public void FileContent()
        {
            using (new NFX.ApplicationModel.ServiceBaseApplication(null, LACONF.AsLaconicConfig()))
            {
                var client = new WebDAV(SVN_ROOT, 0, SVN_UNAME, SVN_UPSW);

                WebDAV.Directory root = client.Root;

                WebDAV.File file = root.Children.First(c => c is WebDAV.File) as WebDAV.File;

                using (MemoryStream ms = new MemoryStream())
                {
                    file.GetContent(ms);
                    Assert.Greater(ms.Length, 0);
                }
            }
        }
Exemplo n.º 4
0
        public void FileContent()
        {
            using (new AzosApplication(null, LACONF.AsLaconicConfig()))
            {
                var client = new WebDAV(SVN_ROOT, 0, SVN_UNAME, SVN_UPSW);

                WebDAV.Directory root = client.Root;

                WebDAV.File file = root.Children.First(c => c is WebDAV.File) as WebDAV.File;

                using (MemoryStream ms = new MemoryStream())
                {
                    file.GetContent(ms);
                    Aver.IsTrue(ms.Length > 0);
                }
            }
        }
Exemplo n.º 5
0
        public void NavigatePathFile()
        {
            using (new NFX.ApplicationModel.ServiceBaseApplication(null, LACONF.AsLaconicConfig()))
            {
                var client = new WebDAV(SVN_ROOT, 0, SVN_UNAME, SVN_UPSW);

                WebDAV.Directory root = client.Root;

                WebDAV.File nested = root.NavigatePath("/trunk/Source/NFX/LICENSE.txt") as WebDAV.File;

                Assert.IsNotNull(nested);
                Assert.AreEqual("LICENSE.txt", nested.Name);

                using (MemoryStream s = new MemoryStream())
                {
                    nested.GetContent(s);
                    Assert.Greater(s.Length, 0);
                }
            }
        }
Exemplo n.º 6
0
        public void NavigatePathFile()
        {
            using (new AzosApplication(null, LACONF.AsLaconicConfig()))
            {
                var client = new WebDAV(SVN_ROOT, 0, SVN_UNAME, SVN_UPSW);

                WebDAV.Directory root = client.Root;

                WebDAV.File nested = root.NavigatePath("/trunk/Source/Azos/LICENSE.txt") as WebDAV.File;

                Aver.IsNotNull(nested);
                Aver.AreEqual("LICENSE.txt", nested.Name);

                using (MemoryStream s = new MemoryStream())
                {
                    nested.GetContent(s);
                    Aver.IsTrue(s.Length > 0);
                }
            }
        }
Exemplo n.º 7
0
 public SVNFileSystemStream(FileSystemFile file, Action<FileSystemStream> disposeAction)
     : base(file, disposeAction)
 {
     m_wdFile = ((SVNFileSystem.SVNFSH)file.Handle).Item as WebDAV.File;
     SVNFileSystem fs = file.FileSystem as SVNFileSystem;
 }