本文整理汇总了C#中ThoughtWorks.CruiseControl.Core.IntegrationResult类的典型用法代码示例。如果您正苦于以下问题:C# IntegrationResult类的具体用法?C# IntegrationResult怎么用?C# IntegrationResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntegrationResult类属于ThoughtWorks.CruiseControl.Core命名空间,在下文中一共展示了IntegrationResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateFullManifest
public void GenerateFullManifest()
{
ManifestGenerator generator = new ManifestGenerator();
IntegrationRequest request = new IntegrationRequest(BuildCondition.ForceBuild, "Somewhere", null);
IntegrationSummary summary = new IntegrationSummary(IntegrationStatus.Success, "A Label", "Another Label", new DateTime(2009, 1, 1));
IntegrationResult result = new IntegrationResult("Test project", "Working directory", "Artifact directory", request, summary);
Modification modification1 = GenerateModification("first file", "Add");
Modification modification2 = GenerateModification("second file", "Modify");
result.Modifications = new Modification[] { modification1, modification2 };
List<string> files = new List<string>();
files.Add("first file");
XmlDocument manifest = generator.Generate(result, files.ToArray());
Assert.IsNotNull(manifest);
string actualManifest = manifest.OuterXml;
string expectedManifest = "<manifest>" +
"<header project=\"Test project\" label=\"A Label\" build=\"ForceBuild\" status=\"Unknown\">" +
"<modification user=\"johnDoe\" changeNumber=\"1\" time=\"2009-01-01T00:00:00\">" +
"<comment>A comment</comment>" +
"<file name=\"first file\" type=\"Add\" />" +
"<file name=\"second file\" type=\"Modify\" />" +
"</modification>" +
"</header>" +
"<file name=\"first file\" />" +
"</manifest>";
Assert.AreEqual(expectedManifest, actualManifest);
}
示例2: ShouldThrowExceptionWhenSimulateFailureIsTrue
public void ShouldThrowExceptionWhenSimulateFailureIsTrue()
{
IntegrationResult result = new IntegrationResult();
task.SimulateFailure = true;
Assert.That(delegate { task.Run(result); }, Throws.TypeOf<Exception>());
}
示例3: PassesThroughLabelSourceControl
public void PassesThroughLabelSourceControl()
{
//// SETUP
IntegrationResult result = new IntegrationResult();
_mockSC.Expect("LabelSourceControl", result);
//// EXECUTE
_filteredSourceControl.LabelSourceControl(result);
}
示例4: SetUp
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;
}
示例5: PublishersShouldBeTasks
public void PublishersShouldBeTasks()
{
IMock mock = new DynamicMock(typeof (ITask));
IntegrationResult result = new IntegrationResult();
mock.Expect("Run", result);
ITask publisher = (ITask) mock.MockInstance;
publisher.Run(result);
}
示例6: PassesThroughGetSource
public void PassesThroughGetSource()
{
//// SETUP
IntegrationResult result = new IntegrationResult();
_mockSC.Expect("GetSource", result);
//// EXECUTE
_filteredSourceControl.GetSource(result);
}
示例7: SetUp
public void SetUp()
{
srcRoot = SystemPath.UniqueTempPath();
pubRoot = SystemPath.UniqueTempPath();
publisher = new BuildPublisher();
publisher.PublishDir = pubRoot.ToString();
publisher.SourceDir = srcRoot.ToString();
result = IntegrationResultMother.CreateSuccessful("99");
labelPubDir = pubRoot.Combine("99");
}
示例8: StartNewIntegration
public IIntegrationResult StartNewIntegration()
{
currentResult = new IntegrationResult(project.Name, project.WorkingDirectory);
currentResult.LastIntegrationStatus = LastIntegrationResult.Status;
currentResult.BuildCondition = DetermineBuildCondition(BuildCondition.NoBuild);
currentResult.Label = project.Labeller.Generate(LastIntegrationResult);
currentResult.ArtifactDirectory = project.ArtifactDirectory;
currentResult.ProjectUrl = project.WebURL;
currentResult.LastSuccessfulIntegrationLabel = LastIntegrationResult.LastSuccessfulIntegrationLabel;
return currentResult;
}
示例9: LastIntegrationResultShouldBeLoadedOnlyOnceFromStateManager
public void LastIntegrationResultShouldBeLoadedOnlyOnceFromStateManager()
{
IntegrationResult expected = new IntegrationResult();
ExpectToLoadState(expected);
IIntegrationResult actual = manager.LastIntegrationResult;
Assert.AreEqual(expected, actual);
// re-request should not reload integration result
actual = manager.LastIntegrationResult;
Assert.AreEqual(expected, actual);
}
示例10: SavingCurrentIntegrationShouldSetItToLastIntegrationResult
public void SavingCurrentIntegrationShouldSetItToLastIntegrationResult()
{
IIntegrationResult lastResult = new IntegrationResult();
ExpectToLoadState(lastResult);
IIntegrationResult expected = manager.StartNewIntegration(ModificationExistRequest());
Assert.AreEqual(lastResult, manager.LastIntegrationResult);
mockStateManager.Expect("SaveState", expected);
manager.FinishIntegration();
Assert.AreEqual(expected, manager.LastIntegrationResult);
}
示例11: ShouldNotEncloseBuilderOutputInCDATAIfNotSingleRootedXml
public void ShouldNotEncloseBuilderOutputInCDATAIfNotSingleRootedXml()
{
string nantOut = @"NAnt 0.85 (Build 0.85.1714.0; net-1.0.win32; nightly; 10/09/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net
<buildresults project=""test"" />";
result = CreateIntegrationResult(IntegrationStatus.Success, false);
result.AddTaskResult(nantOut);
Assert.AreEqual(CreateExpectedBuildXml(result, nantOut), GenerateBuildOutput(result));
}
示例12: SetUpFixtureData
protected void SetUpFixtureData()
{
lastBuild = IntegrationResultMother.CreateSuccessful(CreateDateTime(12, 01, 00));
thisBuild = IntegrationResultMother.CreateSuccessful(CreateDateTime(12, 02, 00));
mods = new Modification[] { CreateModificationAtTime(12, 01, 30) };
mockSourceControl = new DynamicMock(typeof (ISourceControl));
mockSourceControl.Strict = true;
mockDateTimeProvider = new DynamicMock(typeof (DateTimeProvider));
mockDateTimeProvider.Strict = true;
quietPeriod = new QuietPeriod((DateTimeProvider) mockDateTimeProvider.MockInstance);
}
示例13: CreateExpectedBuildXml
public static string CreateExpectedBuildXml(IntegrationResult result, string expectedBuildOutput)
{
string error = (result.Status == IntegrationStatus.Failure) ? " error=\"true\"" : String.Empty;
if (expectedBuildOutput == null)
{
return string.Format(@"<build date=""{0}"" buildtime=""00:00:00""{1} buildcondition=""{2}"" />", DateUtil.FormatDate(result.StartTime), error, result.BuildCondition);
}
else
{
expectedBuildOutput = expectedBuildOutput.Replace("\r", string.Empty);
return string.Format(@"<build date=""{0}"" buildtime=""00:00:00""{1} buildcondition=""{3}"">{2}</build>", DateUtil.FormatDate(result.StartTime), error, expectedBuildOutput, result.BuildCondition);
}
}
示例14: VerifyGoToBranchProcessInfoBasic
public void VerifyGoToBranchProcessInfoBasic()
{
IntegrationRequest request = new IntegrationRequest(BuildCondition.ForceBuild, "source", null);
IntegrationSummary lastSummary =
new IntegrationSummary(IntegrationStatus.Success, "label", "lastlabel", DateTime.Now);
IntegrationResult result = new IntegrationResult("test", @"c:\workspace", @"c:\artifacts", request, lastSummary);
PlasticSCM plasticscm = new PlasticSCM();
NetReflector.Read(PLASTICSCM_XML, plasticscm);
string expected = @"c:\plastic\client\cm.exe stb br:/main -repository=mainrep";
ProcessInfo info = plasticscm.GoToBranchProcessInfo(result);
Assert.AreEqual(expected, info.FileName + " " + info.Arguments);
}
示例15: VerifyNewGetSourceProcessInfoBasic
public void VerifyNewGetSourceProcessInfoBasic()
{
IntegrationRequest request = new IntegrationRequest(BuildCondition.ForceBuild, "source", null);
IntegrationSummary lastSummary =
new IntegrationSummary(IntegrationStatus.Success, "label", "lastlabel", DateTime.Now);
IntegrationResult result = new IntegrationResult("test", @"c:\workspace", @"c:\artifacts", request, lastSummary);
PlasticSCM plasticscm = new PlasticSCM();
NetReflector.Read(PLASTICSCM_BASIC_XML, plasticscm);
string expected = @"cm update c:\workspace";
ProcessInfo info = plasticscm.NewGetSourceProcessInfo(result);
Assert.AreEqual(expected, info.FileName + " " + info.Arguments);
}