51Testing软件测试论坛
标题:
谁能帮我看看这段单元测试代码什么意思啊?
[打印本页]
作者:
honeybobo
时间:
2008-7-3 12:11
标题:
谁能帮我看看这段单元测试代码什么意思啊?
#if UNIT_TESTS
using System.Threading;
using NUnit.Framework;
namespace Microsoft.Practices.EnterpriseLibrary.Caching.Tests
...{
[TestFixture]
public class BackgroundSchedulerFixture
...{
[Test]
public void SchedulerCanBeStoppedWhenRequested()
...{
BackgroundScheduler scheduler = new BackgroundScheduler(null, null);
scheduler.Start();
Thread.Sleep(2500);
Assert.IsTrue(scheduler.IsActive);
scheduler.Stop();
Thread.Sleep(10000);
Assert.IsFalse(scheduler.IsActive);
}
}
}
#endif
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2