comparison Stocks/Stocks.Service.Tests.Unit/StockServiceTests.cs @ 4:57f20ba55884

Fix for webClientShim to use downloadString instead of downloadData Refactoring and introduction of static TimedDelegates.Execute() helper method
author stevenh7776 stevenhollidge@hotmail.com
date Mon, 20 Feb 2012 23:04:58 +0700
parents 29ed98d659e9
children c812bca7b1ac
comparison
equal deleted inserted replaced
3:ef54074d5285 4:57f20ba55884
28 using (var task = Task.Factory.StartNew(() => 28 using (var task = Task.Factory.StartNew(() =>
29 { 29 {
30 service.Start(); 30 service.Start();
31 Assert.Equal(true, service.IsActive); 31 Assert.Equal(true, service.IsActive);
32 32
33 using (var task2 = Task.Factory.StartNew(() => Thread.Sleep(500))) 33 using (var task2 = Task.Factory.StartNew(() => Thread.Sleep(50)))
34 { task2.Wait(); } 34 { task2.Wait(); }
35 service.Stop(); 35 service.Stop();
36 Assert.Equal(false, service.IsActive); 36 Assert.Equal(false, service.IsActive);
37 })) 37 }))
38 { 38 {