public void TestInfoCommand() { SvnInfo info = new SvnInfo(); string localPath = Path.Combine(TaskUtility.getProjectRootDirectory(true), "Source"); info.LocalPath = localPath; string expectedCommand = String.Format("info \"{0}\" --xml --non-interactive --no-auth-cache", localPath); string actualCommand = TaskUtility.GetToolTaskCommand(info); Assert.AreEqual(expectedCommand, actualCommand); }
public void TestInfoReturnValues() { SvnInfo info = new SvnInfo(); info.LocalPath = Path.Combine(TaskUtility.getProjectRootDirectory(true), "Source"); info.BuildEngine = new MockBuild(); Assert.IsTrue(info.Execute()); string val = info.RepositoryPath; // "http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk" // could also be svn:// Assert.AreEqual(0, val.IndexOf("http://")); Assert.AreEqual(NodeKind.dir.ToString(), info.NodeKind); Assert.AreEqual("http://msbuildtasks.tigris.org/svn/msbuildtasks", info.RepositoryRoot); Assert.AreNotEqual(Guid.Empty, info.RepositoryUuid); }