public virtual void SetUp()
		{
			CreateProcessExecutorMock(VaultVersionChecker.DefaultExecutable);
			mockHistoryParser = new DynamicMock(typeof (IHistoryParser));
			vault = new VaultVersionChecker((IHistoryParser) mockHistoryParser.MockInstance, (ProcessExecutor) mockProcessExecutor.MockInstance, VaultVersionChecker.EForcedVaultVersion.Vault3);

			result = IntegrationResultMother.CreateSuccessful("foo");
			result.WorkingDirectory = this.DefaultWorkingDirectory;
		}
		public override void SetUp()
		{
			Thread.CurrentThread.CurrentCulture = culture;

			CreateProcessExecutorMock(VaultVersionChecker.DefaultExecutable);
			mockHistoryParser = new DynamicMock(typeof (IHistoryParser));
			vault = new VaultVersionChecker(new VaultHistoryParser(culture), (ProcessExecutor) mockProcessExecutor.MockInstance, VaultVersionChecker.EForcedVaultVersion.Vault317);

			result = IntegrationResultMother.CreateSuccessful("foo");
			result.WorkingDirectory = this.DefaultWorkingDirectory;
			_bModificationsRetrieved = false;
		}
Beispiel #3
0
 public Vault3(VaultVersionChecker versionCheckerShim, IHistoryParser historyParser, ProcessExecutor executor) : base(historyParser, executor)
 {
     this._shim   = versionCheckerShim;
     this.Timeout = _shim.Timeout;
 }
Beispiel #4
0
 public Vault3(VaultVersionChecker versionCheckerShim) : base(new VaultHistoryParser())
 {
     _shim        = versionCheckerShim;
     this.Timeout = _shim.Timeout;
 }
Beispiel #5
0
 /// <summary>
 /// Called only by the unit tests, sets up as appropriate.
 /// </summary>
 /// <param name="versionCheckerShim"></param>
 /// <param name="historyParser"></param>
 /// <param name="executor"></param>
 public Vault317(VaultVersionChecker versionCheckerShim, IHistoryParser historyParser, ProcessExecutor executor) : base(versionCheckerShim, historyParser, executor)
 {
 }
Beispiel #6
0
 public Vault317(VaultVersionChecker versionCheckerShim) : base(versionCheckerShim)
 {
     _folderVersion = 0;
     _lastTxID      = 0;
 }
Beispiel #7
0
 /// <summary>
 /// Called only by the unit tests, sets up as appropriate.
 /// </summary>
 /// <param name="versionCheckerShim"></param>
 /// <param name="historyParser"></param>
 /// <param name="executor"></param>
 public Vault317(VaultVersionChecker versionCheckerShim, IHistoryParser historyParser, ProcessExecutor executor)
     : base(versionCheckerShim, historyParser, executor)
 {
 }
Beispiel #8
0
 public Vault317(VaultVersionChecker versionCheckerShim)
     : base(versionCheckerShim)
 {
     _folderVersion = 0;
     _lastTxID = 0;
 }
		public virtual void ValuesShouldBeSetFromConfigurationXml()
		{
			const string ST_XML_SSL = @"<vault>
				<executable>d:\program files\sourcegear\vault client\vault.exe</executable>
				<username>username</username>
				<password>password</password>
				<host>localhost</host>
				<repository>repository</repository>
				<folder>$\foo</folder>
				<ssl>True</ssl>
				<autoGetSource>True</autoGetSource>
				<applyLabel>True</applyLabel>
				<useWorkingDirectory>false</useWorkingDirectory>
				<historyArgs>-blah test</historyArgs>
				<timeout>2400000</timeout>
				<workingDirectory>c:\source</workingDirectory>
				<cleanCopy>true</cleanCopy>
				<setFileTime>current</setFileTime>
				<proxyServer>proxyhost</proxyServer>
				<proxyPort>12345</proxyPort>
				<proxyUser>proxyuser</proxyUser>
				<proxyPassword>proxypassword</proxyPassword>
				<proxyDomain>proxydomain</proxyDomain>
				<pollRetryAttempts>10</pollRetryAttempts>
				<pollRetryWait>30</pollRetryWait >
			</vault>";

			vault = CreateVault(ST_XML_SSL);
			Assert.AreEqual(@"d:\program files\sourcegear\vault client\vault.exe", vault.Executable);
			Assert.AreEqual("username", vault.Username);
			Assert.AreEqual("password", vault.Password.PrivateValue);
			Assert.AreEqual("localhost", vault.Host);
			Assert.AreEqual("repository", vault.Repository);
			Assert.AreEqual("$\\foo", vault.Folder);
			Assert.AreEqual(true, vault.Ssl);
			Assert.AreEqual(true, vault.AutoGetSource);
			Assert.AreEqual(true, vault.ApplyLabel);
			Assert.AreEqual(false, vault.UseVaultWorkingDirectory);
			Assert.AreEqual("-blah test", vault.HistoryArgs);
			Assert.AreEqual(2400000, vault.Timeout.Millis);
			Assert.AreEqual(@"c:\source", vault.WorkingDirectory);
			Assert.AreEqual(true, vault.CleanCopy);
			Assert.AreEqual("current", vault.setFileTime);
			Assert.AreEqual("proxyhost", vault.proxyServer);
			Assert.AreEqual("12345", vault.proxyPort);
			Assert.AreEqual("proxyuser", vault.proxyUser);
			Assert.AreEqual("proxypassword", vault.proxyPassword);
			Assert.AreEqual("proxydomain", vault.proxyDomain);
			Assert.AreEqual(10, vault.pollRetryAttempts);
			Assert.AreEqual(30, vault.pollRetryWait);
		}
Beispiel #10
0
		public virtual void ShouldBePopulatedWithDefaultValuesWhenLoadingFromMinimalXml()
		{
			vault = CreateVault
				(@"
				<vault>
					<host>localhost</host>
					<username>name</username>
					<password>password</password>
					<repository>repository</repository>
				</vault>
			");
			Assert.AreEqual(VaultVersionChecker.DefaultExecutable, vault.Executable);
			Assert.AreEqual("name", vault.Username);
			Assert.AreEqual("password", vault.Password.PrivateValue);
			Assert.AreEqual("localhost", vault.Host);
			Assert.AreEqual("repository", vault.Repository);
			Assert.AreEqual("$", vault.Folder);
			Assert.AreEqual(false, vault.Ssl);
			Assert.AreEqual(true, vault.AutoGetSource);
			Assert.AreEqual(false, vault.ApplyLabel);
			Assert.AreEqual(true, vault.UseVaultWorkingDirectory);
			Assert.AreEqual(VaultVersionChecker.DefaultHistoryArgs, vault.HistoryArgs);
			Assert.AreEqual(Timeout.DefaultTimeout, vault.Timeout);
			Assert.IsNull(vault.WorkingDirectory);
			Assert.AreEqual(false, vault.CleanCopy);
			Assert.AreEqual("checkin", vault.setFileTime);
			Assert.IsNull(vault.proxyServer);
			Assert.IsNull(vault.proxyPort);
			Assert.IsNull(vault.proxyUser);
			Assert.IsNull(vault.proxyPassword);
			Assert.IsNull(vault.proxyDomain);
			Assert.AreEqual(VaultVersionChecker.DefaultPollRetryAttempts, vault.pollRetryAttempts);
			Assert.AreEqual(VaultVersionChecker.DefaultPollRetryWait, vault.pollRetryWait);
		}
Beispiel #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Vault3" /> class.	
        /// </summary>
        /// <param name="versionCheckerShim">The version checker shim.</param>
        /// <param name="historyParser">The history parser.</param>
        /// <param name="executor">The executor.</param>
        /// <remarks></remarks>
		public Vault3(VaultVersionChecker versionCheckerShim, IHistoryParser historyParser, ProcessExecutor executor) : base(historyParser, executor)
		{
			this._shim = versionCheckerShim;
			this.Timeout = _shim.Timeout;
		}
Beispiel #12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Vault3" /> class.	
        /// </summary>
        /// <param name="versionCheckerShim">The version checker shim.</param>
        /// <remarks></remarks>
		public Vault3(VaultVersionChecker versionCheckerShim) : base(new VaultHistoryParser())
		{
			_shim = versionCheckerShim;
			this.Timeout = _shim.Timeout;
		}
Beispiel #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Vault317" /> class.	
 /// </summary>
 /// <param name="versionCheckerShim">The version checker shim.</param>
 /// <remarks></remarks>
 public Vault317(VaultVersionChecker versionCheckerShim)
     : base(versionCheckerShim)
 {
     /*_folderVersion = 0*/;
     /*_lastTxID = 0*/;
 }
Beispiel #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Vault317" /> class.
 /// </summary>
 /// <param name="versionCheckerShim">The version checker shim.</param>
 /// <remarks></remarks>
 public Vault317(VaultVersionChecker versionCheckerShim)
     : base(versionCheckerShim)
 {
     /*_folderVersion = 0*/;
     /*_lastTxID = 0*/;
 }