Esempio 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);
        }
Esempio n. 2
0
        public void SvnExportRemoteCommand()
        {
            string exportDir = Path.Combine(testDirectory, @"MSBuildTasksExport");
            string remotePath =
                "http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk/Source/MSBuild.Community.Tasks.Tests/Subversion";

            SvnExport export = new SvnExport();

            export.LocalPath = exportDir;
            export.RepositoryPath = remotePath;
            export.Username = "******";
            export.Password = "******";

            string expectedCommand =
                String.Format(
                    "export \"{0}\" \"{1}\" --username guest --password guest1 --non-interactive --no-auth-cache",
                    remotePath, exportDir);
            string actualCommand = TaskUtility.GetToolTaskCommand(export);
            Assert.AreEqual(expectedCommand, actualCommand);
        }
Esempio n. 3
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);
        }