Ejemplo n.º 1
0
        public void SvnCheckoutRemote()
        {
            SvnCheckout checkout = new SvnCheckout();
            checkout.BuildEngine = new MockBuild();

            Assert.IsNotNull(checkout);

            checkout.LocalPath = Path.Combine(testDirectory, @"MSBuildTasksCheckout");
            checkout.RepositoryPath =
                "http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk/Source/MSBuild.Community.Tasks.Tests/Subversion";
            checkout.Username = "******";
            checkout.Password = "******";
            bool result = checkout.Execute();

            Assert.IsTrue(result);
            Assert.IsTrue(checkout.Revision > 0);
        }
Ejemplo n.º 2
0
        public void SvnCheckoutRemoteCommandLine()
        {
            SvnCheckout checkout = new SvnCheckout();
            string localPath = Path.Combine(testDirectory, @"MSBuildTasksCheckout");
            string remotePath =
                "http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk/Source/MSBuild.Community.Tasks.Tests/Subversion";

            checkout.LocalPath = localPath;
            checkout.RepositoryPath = remotePath;
            checkout.Username = "******";
            checkout.Password = "******";

            string expectedCommand =
                String.Format(
                    "checkout \"{0}\" \"{1}\" --username guest --password guest1 --non-interactive --no-auth-cache",
                    remotePath, localPath);
            string actualCommand = TaskUtility.GetToolTaskCommand(checkout);
            Assert.AreEqual(expectedCommand, actualCommand);
        }
Ejemplo n.º 3
0
        public void SvnCheckoutLocal()
        {
            string repoPath = "d:/svn/repo/Test";
            DirectoryInfo dirInfo = new DirectoryInfo(repoPath);
            if (!dirInfo.Exists)
            {
                Assert.Ignore("Repository path '{0}' does not exist", repoPath);
            }

            SvnCheckout checkout = new SvnCheckout();
            checkout.BuildEngine = new MockBuild();

            Assert.IsNotNull(checkout);

            checkout.LocalPath = Path.Combine(testDirectory, @"TestCheckout");
            checkout.RepositoryPath = "file:///" + repoPath + "/trunk";
            bool result = checkout.Execute();

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