Ejemplo n.º 1
0
        public void SvnExportLocal()
        {
            string repoPath = "d:/svn/repo/Test";
            DirectoryInfo dirInfo = new DirectoryInfo(repoPath);
            if (!dirInfo.Exists)
            {
                Assert.Ignore("Repository path '{0}' does not exist", repoPath);
            }

            string exportDir = Path.Combine(testDirectory, @"TestExport");
            if (Directory.Exists(exportDir))
                Directory.Delete(exportDir, true);

            SvnExport export = new SvnExport();
            export.BuildEngine = new MockBuild();

            Assert.IsNotNull(export);

            export.LocalPath = exportDir;
            export.RepositoryPath = "file:///" + repoPath + "/trunk";
            bool result = export.Execute();

            Assert.IsTrue(result);
            Assert.IsTrue(export.Revision > 0);
        }
Ejemplo n.º 2
0
        public void SvnExportRemote()
        {
            string exportDir = Path.Combine(testDirectory, @"MSBuildTasksExport");
            if (Directory.Exists(exportDir))
                Directory.Delete(exportDir, true);

            SvnExport export = new SvnExport();
            export.BuildEngine = new MockBuild();

            Assert.IsNotNull(export);

            export.LocalPath = exportDir;
            export.RepositoryPath =
                "http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk/Source/MSBuild.Community.Tasks.Tests/Subversion";
            export.Username = "******";
            export.Password = "******";
            bool result = export.Execute();

            Assert.IsTrue(result);
            Assert.IsTrue(export.Revision > 0);
        }