public virtual void SetUp()
		{
			/* TODO We should test use of custom environmental variables.
             *      .NET 2.0 adds the method Environment.SetEnvironmentVariable(),
             *      which would support this approach */

			synergy = (Synergy) NetReflector.Read(SynergyMother.ConfigValues);
			Assert.IsNotNull(synergy.UrlBuilder);
			Assert.IsTrue(synergy.UrlBuilder is ChangeSynergyUrlBuilder);
			synergyUrlBuilder = synergy.UrlBuilder as ChangeSynergyUrlBuilder;
			Assert.IsNotNull(synergyUrlBuilder);
		}
		public void VerifyDefaultValues()
		{
			Synergy synergy = new Synergy();
			Assert.AreEqual("ccm.exe", synergy.Connection.Executable, "#A1");
			Assert.AreEqual("localhost", synergy.Connection.Host, "#A2");
			Assert.IsNull(synergy.Connection.Database, "#A3");
			Assert.IsNull(synergy.Connection.SessionId, "#A4");
			Assert.AreEqual(3600, synergy.Connection.Timeout, "#A5");
			Assert.AreEqual('-', synergy.Connection.Delimiter, "#A6");
			Assert.IsNull(synergy.Project.Release, "#A7");
			Assert.AreEqual(0, synergy.Project.TaskFolder, "#A8");
			Assert.AreEqual(Environment.ExpandEnvironmentVariables("%USERNAME%"), synergy.Connection.Username, "#A9");
			Assert.AreEqual(String.Empty, synergy.Connection.Password, "#A10");
			Assert.AreEqual("build_mgr", synergy.Connection.Role, "#A11");
			Assert.IsFalse(synergy.Connection.PollingEnabled, "#A12");
			Assert.IsFalse(synergy.Project.BaseliningEnabled, "#A13");
			Assert.IsFalse(synergy.Project.TemplateEnabled, "#A14");
			Assert.IsNull(synergy.Project.ReconcilePaths, "#A15");
			Assert.AreEqual("Integration Testing", synergy.Project.Purpose, "#A16");
		}
		public void GetReconfigureTimeShouldHandleNonUSDates()
		{
			string dateString = "samedi 2 décembre 2006";
			IMock mockCommand = new DynamicMock(typeof(ISynergyCommand));
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult(dateString), new IsAnything());
			SynergyConnectionInfo connectionInfo = new SynergyConnectionInfo();
			connectionInfo.FormatProvider = new CultureInfo("FR-fr");
			Synergy synergy = new Synergy(connectionInfo, new SynergyProjectInfo(), (ISynergyCommand) mockCommand.MockInstance, null);
			DateTime time = synergy.GetReconfigureTime();
			mockCommand.Verify();
		}
		public void ApplyLabel()
		{
			IMock mockCommand = new DynamicMock(typeof(ISynergyCommand));
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult(DateTime.MinValue.ToString(CultureInfo.InvariantCulture)), new IsAnything());
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything());
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything(), false);
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything(), false);
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything(), false);
			IMock mockParser = new DynamicMock(typeof(SynergyParser));
			mockParser.ExpectAndReturn("Parse", new Modification[0], new IsAnything(), new IsAnything(), new NotNull());

			SynergyConnectionInfo connectionInfo = new SynergyConnectionInfo();
			connectionInfo.FormatProvider = CultureInfo.InvariantCulture;
			Synergy synergy = new Synergy(connectionInfo, new SynergyProjectInfo(), (ISynergyCommand) mockCommand.MockInstance, (SynergyParser) mockParser.MockInstance);
			IntegrationResult integrationResult = new IntegrationResult();
			integrationResult.Status = ThoughtWorks.CruiseControl.Remote.IntegrationStatus.Success;
			synergy.LabelSourceControl(integrationResult);
			mockCommand.Verify();
		}
		public void GetModifications()
		{
			IMock mockCommand = new DynamicMock(typeof(ISynergyCommand));
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything());
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything(), false);
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything(), false);
			mockCommand.ExpectAndReturn("Execute", ProcessResultFixture.CreateSuccessfulResult("output"), new IsAnything(), false);
			IMock mockParser = new DynamicMock(typeof(SynergyParser));
			mockParser.ExpectAndReturn("Parse", new Modification[0], new IsAnything(), new IsAnything(), new NotNull());

			Synergy synergy = new Synergy(new SynergyConnectionInfo(), new SynergyProjectInfo(), (ISynergyCommand) mockCommand.MockInstance, (SynergyParser) mockParser.MockInstance);
			synergy.GetModifications(new IntegrationResult(), new IntegrationResult());
			mockCommand.Verify();
		}