Esempio n. 1
0
		public void PopulateFromFullySpecifiedXml()
		{
			string xml = @"
<svn>
	<executable>c:\svn\svn.exe</executable>
	<trunkUrl>svn://myserver/mypath</trunkUrl>
	<timeout>5</timeout>
	<workingDirectory>c:\dev\src</workingDirectory>
	<username>user</username>
	<password>password</password>
	<tagOnSuccess>true</tagOnSuccess>
    <tagCommitMessage>MyTagMessage</tagCommitMessage>
    <tagNameFormat>MyTagNameFormat</tagNameFormat>
	<tagWorkingCopy>true</tagWorkingCopy>
	<tagBaseUrl>svn://myserver/mypath/tags</tagBaseUrl>
	<autoGetSource>true</autoGetSource>
	<checkExternals>true</checkExternals>
</svn>";

			svn = (Svn) NetReflector.Read(xml);
			Assert.AreEqual(@"c:\svn\svn.exe", svn.Executable);
			Assert.AreEqual("svn://myserver/mypath", svn.TrunkUrl);
			Assert.AreEqual(new Timeout(5), svn.Timeout);
			Assert.AreEqual(@"c:\dev\src", svn.WorkingDirectory);
			Assert.AreEqual("user", svn.Username);
			Assert.AreEqual("password", svn.Password.PrivateValue);
			Assert.AreEqual(true, svn.TagOnSuccess);
            Assert.AreEqual("MyTagMessage", svn.TagCommitMessage);
            Assert.AreEqual("MyTagNameFormat", svn.TagNameFormat);
            Assert.AreEqual(true, svn.TagWorkingCopy);
			Assert.AreEqual(true, svn.AutoGetSource);
			Assert.AreEqual(true, svn.CheckExternals);
			Assert.AreEqual("svn://myserver/mypath/tags", svn.TagBaseUrl);
		}
Esempio n. 2
0
		protected void SetUp()
		{
			from = DateTime.Parse("2001-01-21 20:00:00Z");
			to = DateTime.Parse("2001-01-21 20:30:50Z");
			CreateProcessExecutorMock(Svn.DefaultExecutable);
			mockHistoryParser = new DynamicMock(typeof(IHistoryParser));
			mockFileSystem = new DynamicMock(typeof (IFileSystem));
			svn = new Svn((ProcessExecutor) mockProcessExecutor.MockInstance, (IHistoryParser) mockHistoryParser.MockInstance, (IFileSystem) mockFileSystem.MockInstance);
			svn.TrunkUrl = "svn://myserver/mypath";
			svn.TagBaseUrl = "svn://someserver/tags/foo";
			svn.WorkingDirectory = DefaultWorkingDirectory;
		}
Esempio n. 3
0
		public void SpecifyFromMinimallySpecifiedXml()
		{
			string xml = @"<svn/>";
			svn = (Svn) NetReflector.Read(xml);
            Assert.AreEqual("svn", svn.Executable);
            Assert.AreEqual(false, svn.TagWorkingCopy);
		}