當前位置: 首頁>>代碼示例>>C#>>正文


C# IntegrationResult.AddTaskResult方法代碼示例

本文整理匯總了C#中ThoughtWorks.CruiseControl.Core.IntegrationResult.AddTaskResult方法的典型用法代碼示例。如果您正苦於以下問題:C# IntegrationResult.AddTaskResult方法的具體用法?C# IntegrationResult.AddTaskResult怎麽用?C# IntegrationResult.AddTaskResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ThoughtWorks.CruiseControl.Core.IntegrationResult的用法示例。


在下文中一共展示了IntegrationResult.AddTaskResult方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: AttemptToSaveWithInvalidXml

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

			result = IntegrationResultMother.CreateSuccessful();
			result.Label = "<&/<>";
			result.AddTaskResult("<badxml>>");
			state = new FileStateManager(fileSystem, executionEnvironment);
			state.SaveState(result);
		}
開發者ID:nickdevore,項目名稱:CruiseControl.NET,代碼行數:13,代碼來源:FileStateManagerTest.cs

示例3: CloneShouldWork

        public void CloneShouldWork()
        {
            string workingDir = Path.GetFullPath(Path.Combine(".", "workingdir"));
            string artifactDir = Path.GetFullPath(Path.Combine(".", "artifacts"));

            result = new IntegrationResult("project", workingDir, artifactDir,
                                           new IntegrationRequest(BuildCondition.IfModificationExists, "myTrigger", "John Doe"),
                                           new IntegrationSummary(IntegrationStatus.Failure, "label23", "label22",
                                                                  new DateTime(2005, 06, 06, 08, 45, 00)));
            result.StartTime = new DateTime(2005, 06, 06, 08, 45, 00);
            result.ProjectUrl = "http://localhost/ccnet2";
            result.BuildId = new Guid(IntegrationResultMother.DefaultBuildId);

            result.AddTaskResult(new ProcessTaskResult(ProcessResultFixture.CreateNonZeroExitCodeResult()));
            result.AddTaskResult(new ProcessTaskResult(ProcessResultFixture.CreateSuccessfulResult()));

            Modification mods = new Modification();
            mods.UserName = "John";
            result.Modifications = new Modification[] { mods };


            var TheClone = result.Clone();


            Assert.AreEqual(result.IntegrationProperties.Count, TheClone.IntegrationProperties.Count);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetProject], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetProject]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetProjectUrl], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetProjectUrl]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetLabel], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetLabel]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetNumericLabel], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetNumericLabel]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetArtifactDirectory], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetArtifactDirectory]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetWorkingDirectory], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetWorkingDirectory]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetBuildCondition], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetBuildCondition]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetIntegrationStatus], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetIntegrationStatus]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetLastIntegrationStatus], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetLastIntegrationStatus]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetRequestSource], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetRequestSource]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetUser], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetUser]);
            Assert.AreEqual(result.IntegrationProperties[IntegrationPropertyNames.CCNetListenerFile], TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetListenerFile]);
            
            ArrayList failureUsers = TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetFailureUsers] as ArrayList;
            Assert.IsNotNull(failureUsers);
            ArrayList failureTasks = TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetFailureTasks] as ArrayList;
            Assert.IsNotNull(failureTasks);
            ArrayList Modifiers = TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetModifyingUsers] as ArrayList;
            Assert.IsNotNull(Modifiers);
            Assert.AreEqual(1, Modifiers.Count);
            Assert.AreEqual("John", Modifiers[0]);
            
            Assert.AreEqual(result.Status, TheClone.Status);
            
            //below are the ones that are not cloned, should these be cloned also, see bug 240
            //http://www.cruisecontrolnet.org/issues/240

            // We purposefully use culture-independent string formats
            //Assert.AreEqual("2005-06-06", TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetBuildDate]);
            //Assert.AreEqual(IntegrationResultMother.DefaultBuildId, TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetBuildId]);
            //Assert.AreEqual("08:45:00", TheClone.IntegrationProperties[IntegrationPropertyNames.CCNetBuildTime]);
            //Assert.AreEqual(1, failureUsers.Count);
            //Assert.AreEqual("user", failureUsers[0]);
            //Assert.AreEqual(1, failureTasks.Count);
            //Assert.AreEqual("task", failureTasks[0]);

        
        }
開發者ID:kascomp,項目名稱:CruiseControl.NET,代碼行數:63,代碼來源:IntegrationResultTest.cs


注:本文中的ThoughtWorks.CruiseControl.Core.IntegrationResult.AddTaskResult方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。