当前位置: 首页>>代码示例>>C#>>正文


C# Core.TestOutput类代码示例

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


TestOutput类属于NUnit.Core命名空间,在下文中一共展示了TestOutput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestOutput

        public void TestOutput(TestOutput testOutput)
        {
            if (this.currentTest == null) return;

            // Ignore TeamCity control messages. These are probably our own messages anyway.
            if (testOutput.Text.ToLowerInvariant().Contains("##teamcity")) return;

            // Ignore blank messages, or messages that consist of empty lines.
            if (string.IsNullOrWhiteSpace(testOutput.Text)) return;

            if (testOutput.Type == TestOutputType.Error)
                Console.WriteLine(TeamCityMessageFormatter.FormatTestErrorMessage(this.currentTest, testOutput.Text.Trim()));
            else if (testOutput.Type != TestOutputType.Trace)
                Console.WriteLine(TeamCityMessageFormatter.FormatTestOutputMessage(this.currentTest, testOutput.Text.Trim()));
        }
开发者ID:boinst,项目名称:boinst-nant,代码行数:15,代码来源:TeamCityTestReporterListener.cs

示例2: switch

        void EventListener.TestOutput(TestOutput testOutput)
        {
            switch (testOutput.Type)
            {
                case TestOutputType.Out:
                    _testOutput.Append(testOutput.Text);
                    break;

                case TestOutputType.Error:
                    Console.Error.Write(testOutput.Text);
                    break;

                default:
                    // Ignore any other output type
                    break;
            }
        }
开发者ID:alfeg,项目名称:nunit,代码行数:17,代码来源:TestEventAdapter.cs

示例3: TestOutput

 /// <summary>
 /// capture any console output during the testing.
 /// </summary>
 /// <param name="testOutput"></param>
 public void TestOutput(TestOutput testOutput)
 {
     currentTestOutput = testOutput.Text;
 }
开发者ID:christianeisendle,项目名称:nunit-testlink-adapter,代码行数:8,代码来源:ResultExporter.cs

示例4: TestOutput

 public void TestOutput(TestOutput testOutput)
 {
     string message = testOutput.Text;
     int length = message.Length;
     int drop = message.EndsWith(Environment.NewLine)
         ? Environment.NewLine.Length
         : message[length - 1] == '\n' || message[length - 1] == '\r'
             ? 1
             : 0;
     if (drop > 0)
         message = message.Substring(0, length - drop);
     message = message.Trim();
     if (!string.IsNullOrEmpty(message))
         testLog.SendMessage(TestMessageLevel.Informational, message);
     string type="";
     // Consider adding this later, as an option.
     //switch (testOutput.Type)
     //{
     //    case TestOutputType.Trace:
     //        type ="Debug: ";
     //        break;
     //    case TestOutputType.Out:
     //        type ="Console: ";
     //        break;
     //    case TestOutputType.Log:
     //        type="Log: ";
     //        break;
     //    case TestOutputType.Error:
     //        type="Error: ";
     //        break;
     //}
     this.Output += (type+message+'\r');
 }
开发者ID:kukubadze,项目名称:nunit-vs-adapter,代码行数:33,代码来源:NUnitEventListener.cs

示例5: Flush

		override public void Flush()
		{
			if ( sb.Length > 0 )
			{
				lock( sb )
				{
					TestOutput output = new TestOutput(sb.ToString(), this.type);
					this.eventListener.TestOutput( output );
					sb.Length = 0;
				}
			}
		}
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:12,代码来源:EventListenerTextWriter.cs

示例6:

 void EventListener.TestOutput(TestOutput testOutput)
 {
     this.FireTestOutput(testOutput);
 }
开发者ID:Phaiax,项目名称:dotnetautoupdate,代码行数:4,代码来源:MockTestEventSource.cs

示例7: TestOutput

		public void TestOutput( TestOutput output)
		{
			switch ( output.Type )
			{
				case TestOutputType.Out:
					outWriter.Write( output.Text );
					break;
				case TestOutputType.Error:
					errorWriter.Write( output.Text );
					break;
			}
		}
开发者ID:Buildstarted,项目名称:ContinuousTests,代码行数:12,代码来源:EventCollector.cs

示例8: TestOutput

 public void TestOutput(TestOutput testOutput)
 {
     Console.WriteLine("output: "+testOutput);
 }
开发者ID:RichIsMyName,项目名称:PicklingToolsRepo,代码行数:4,代码来源:Testrunner.cs

示例9: TestOutput

		public void TestOutput (TestOutput testOutput)
		{
			// Console.WriteLine("TestOutput");
		}
开发者ID:Boerlam001,项目名称:MonoGame,代码行数:4,代码来源:TestEventListenerBase.cs

示例10: TestOutput

 public void TestOutput(TestOutput testOutput)
 {
     Console.WriteLine("TestOutput : {0}", testOutput);
 }
开发者ID:spartanthe,项目名称:TestPlateSharp,代码行数:4,代码来源:LowNUnit.cs

示例11: Write

		public void Write(TestOutput output)
		{
			Write(output.Text);
		}
开发者ID:kobida,项目名称:nunitv2,代码行数:4,代码来源:SimpleTextDisplay.cs

示例12: switch

            void EventListener.TestOutput(TestOutput testOutput)
            {
                if (testContextStack.Count == 0)
                    return;

                ITestContext testContext = testContextStack.Peek();

                string streamName;
                switch (testOutput.Type)
                {
                    default:
                    case TestOutputType.Out:
                        streamName = MarkupStreamNames.ConsoleOutput;
                        break;
                    case TestOutputType.Error:
                        streamName = MarkupStreamNames.ConsoleError;
                        break;
                    case TestOutputType.Trace:
                        streamName = MarkupStreamNames.DebugTrace;
                        break;
                }

                testContext.LogWriter[streamName].Write(testOutput.Text);
            }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:24,代码来源:NUnitTestController.cs

示例13: TestOutput

 public void TestOutput(TestOutput testOutput)
 {
     if (m_testLog != null)
         m_testLog.AppendLine(testOutput.Text);
 }
开发者ID:LostLT,项目名称:TestTools,代码行数:5,代码来源:NUnitTestEngine.cs

示例14: TestOutput

 public void TestOutput(TestOutput output)
 {
     listener.TestOutput (output);
 }
开发者ID:baulig,项目名称:debugger,代码行数:4,代码来源:ProxyListener.cs

示例15: TestOutput

 public void TestOutput(TestOutput testOutput)
 {
     myClient.testOutput(myLastTest, testOutput.Text, testOutput.Type == TestOutputType.Out);
 }
开发者ID:intellisharp,项目名称:intellisharp-nunit-plugin,代码行数:4,代码来源:Program.cs


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