clienttimeoutfixture.cs

来自「C#编写的网络爬虫程序 效率很高 很好用!」· CS 代码 · 共 40 行

CS
40
字号
using System;
using System.IO;
using System.Threading;
using NUnit.Framework;

namespace NUnit.Tests.TimingTests
{
	/// <summary>
	/// Summary description for ClientTimeoutFixture.
	/// </summary>
	[TestFixture]
	public class ClientTimeoutFixture
	{
		// Test using timeout greater than default of five minutes
		private readonly TimeSpan timeout = TimeSpan.FromMinutes( 6 );

		/// <summary>
		/// Test that listener is connected after
		/// a long delay. When run from GUI, this
		/// tests UIActions. When run from console
		/// runner it tests ConsoleUI.
		/// </summary>
		[Test]
		public void ListenerTimeoutTest()
		{
			// Time delay
			Thread.Sleep( timeout );
		}

		[Test]
		public void WriterTimeoutTest()
		{
			// Time delay
			Thread.Sleep( timeout );

			Console.WriteLine( "Message from WriterTimeoutTest" );
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?