• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Core.IntegrationResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ThoughtWorks.CruiseControl.Core.IntegrationResult的典型用法代码示例。如果您正苦于以下问题:C# IntegrationResult类的具体用法?C# IntegrationResult怎么用?C# IntegrationResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IntegrationResult类属于ThoughtWorks.CruiseControl.Core命名空间,在下文中一共展示了IntegrationResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
 }
开发者ID:kyght,项目名称:CruiseControl.NET,代码行数:26,代码来源:ManifestGeneratorTests.cs


示例2: ShouldThrowExceptionWhenSimulateFailureIsTrue

        public void ShouldThrowExceptionWhenSimulateFailureIsTrue()
        {
            IntegrationResult result = new IntegrationResult();
            task.SimulateFailure = true;
            Assert.That(delegate { task.Run(result); }, Throws.TypeOf<Exception>());

        }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:7,代码来源:NullTaskTest.cs


示例3: PassesThroughLabelSourceControl

		public void PassesThroughLabelSourceControl()
		{
			//// SETUP
			IntegrationResult result = new IntegrationResult();
			_mockSC.Expect("LabelSourceControl", result);

			//// EXECUTE
			_filteredSourceControl.LabelSourceControl(result);
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:9,代码来源:FilteredSourceControlTest.cs


示例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;
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:9,代码来源:Vault3Test.cs


示例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);
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:9,代码来源:PublisherTest.cs


示例6: PassesThroughGetSource

		public void PassesThroughGetSource()
		{
			//// SETUP
			IntegrationResult result = new IntegrationResult();
			_mockSC.Expect("GetSource", result);

			//// EXECUTE
			_filteredSourceControl.GetSource(result);
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:9,代码来源:FilteredSourceControlTest.cs


示例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");
		}
开发者ID:kyght,项目名称:CruiseControl.NET,代码行数:11,代码来源:BuildPublisherTest.cs


示例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;
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:11,代码来源:IntegrationResultManager.cs


示例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);
		}
开发者ID:robrich,项目名称:CruiseControl.NET,代码行数:12,代码来源:IntegrationResultManagerTest.cs


示例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);
		}
开发者ID:robrich,项目名称:CruiseControl.NET,代码行数:12,代码来源:IntegrationResultManagerTest.cs


示例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));
        }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:13,代码来源:XmlIntegrationResultWriterTest.cs


示例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);
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:13,代码来源:QuietPeriodTest.cs


示例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);
			}
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:13,代码来源:XmlLogFixture.cs


示例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);
        }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:13,代码来源:PlasticSCMTest.cs


示例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);
		}
开发者ID:robrich,项目名称:CruiseControl.NET,代码行数:13,代码来源:PlasticSCMTest.cs


示例16: VerifyCreateLabelProcessInfoWithAttributes

        public void VerifyCreateLabelProcessInfoWithAttributes()
        {
            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);
            result.Label = "1";

            //check with attributes
            PlasticSCM plasticscm = new PlasticSCM();
            NetReflector.Read(PLASTICSCM_XML, plasticscm);
            string expected = @"c:\plastic\client\cm.exe mklb BL1";
            ProcessInfo info = plasticscm.CreateLabelProcessInfo(result);
            Assert.AreEqual (expected, info.FileName + " " + info.Arguments);
        }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:14,代码来源:PlasticSCMTest.cs


示例17: LoadShouldThrowExceptionIfStateFileDoesNotExist

		public void LoadShouldThrowExceptionIfStateFileDoesNotExist()
		{
            Expect.Call(executionEnvironment.GetDefaultProgramDataFolder(ApplicationType.Server)).IgnoreArguments().Constraints(Rhino.Mocks.Constraints.Is.NotNull()).Return(applicationDataPath);
			Expect.Call(delegate { fileSystem.EnsureFolderExists(applicationDataPath); });
            Expect.Call(fileSystem.Load(null)).IgnoreArguments().Constraints(Rhino.Mocks.Constraints.Is.NotNull()).Throw(new FileNotFoundException());
			mocks.ReplayAll();

			state = new FileStateManager(fileSystem, executionEnvironment);
			result = IntegrationResultMother.CreateSuccessful();
			result.ProjectName = ProjectName;

		    Assert.That(delegate { state.LoadState(ProjectName); },
		                Throws.TypeOf<CruiseControlException>().With.Property("InnerException").TypeOf<FileNotFoundException>());
		}
开发者ID:nickdevore,项目名称:CruiseControl.NET,代码行数:14,代码来源:FileStateManagerTest.cs


示例18: AddModifications

		private static void AddModifications(IntegrationResult result)
		{
			result.Modifications = new Modification[3];
			result.Modifications[0] = ModificationMother.CreateModification("fileName", "folderName",
																			new DateTime(2009, 1, 1), "userName",
																			"comment", "10", "[email protected]",
																			"http://url");
			result.Modifications[1] = ModificationMother.CreateModification("fileName", "folderName",
																			new DateTime(2009, 1, 3), "userName",
																			"comment", "30", "[email protected]",
																			"http://url");
			result.Modifications[2] = ModificationMother.CreateModification("fileName", "folderName",
																			new DateTime(2009, 1, 2), "userName",
																			"comment", "20", "[email protected]",
																			"http://url");
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:16,代码来源:AssemblyVersionLabellerTest.cs


示例19: SaveToNonExistingFolder

        public void SaveToNonExistingFolder()
        {
            string newDirectory = Directory.GetCurrentDirectory() + "\\NewDirectory";
            Assert.IsFalse(Directory.Exists(newDirectory), "The test directory should not exist");

            Expect.Call(executionEnvironment.GetDefaultProgramDataFolder(ApplicationType.Server)).IgnoreArguments().
                Constraints(Rhino.Mocks.Constraints.Is.NotNull()).Return(applicationDataPath);
            Expect.Call(delegate { fileSystem.EnsureGivenFolderExists(newDirectory); });
            Expect.Call(delegate { fileSystem.AtomicSave(string.Empty, string.Empty); }).IgnoreArguments().Constraints(
                Rhino.Mocks.Constraints.Is.NotNull(), Rhino.Mocks.Constraints.Is.Anything());
            mocks.ReplayAll();

            state = new FileStateManager(fileSystem, executionEnvironment);
            state.StateFileDirectory = newDirectory;
            result = IntegrationResultMother.CreateSuccessful();
            result.ProjectName = "my project";
            state.SaveState(result);
        }
开发者ID:nickdevore,项目名称:CruiseControl.NET,代码行数:18,代码来源:FileStateManagerTest.cs


示例20: SetUp

			public void SetUp()
			{
				publisher = new MyStatisticsPublisher();
				publisher.FileName = "buildstatistics.xml";
				processor = new BuildStatisticsProcessor();

				integrationTime = new TimeSpan(0, 3, 0);
				failedBuild = IntegrationResultMother.Create(false, now.Add(-integrationTime));
				failedBuild.ProjectName = "Statistics Publisher";
				failedBuild.EndTime = now;
				failedBuild.Label = failedLabel;

				successfulBuild = IntegrationResultMother.Create(true, now.Add(-integrationTime));
				successfulBuild.ArtifactDirectory = artifactDirectory;
				successfulBuild.ProjectName = "Statistics Publisher";
				successfulBuild.EndTime = now;
				successfulBuild.Label = successfulLabel;
			}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:18,代码来源:MyStatisticsPublisherTest.cs



注:本文中的ThoughtWorks.CruiseControl.Core.IntegrationResult类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Core.Modification类代码示例发布时间:2022-05-26
下一篇:
C# vCards.vCardProperty类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap