Add Unit Test for StartSleepTest.cs

This commit is contained in:
TingLiu6
2016-04-06 01:17:27 -07:00
parent 11afac883f
commit 4a4994ba2d
+19
View File
@@ -1,3 +1,22 @@
Describe "Start-Sleep DRT Unit Tests" -Tags DRT{
It "Shoule be works properly when sleeping with Second" {
$dtStart = [DateTime]::Now
Start-Sleep -Seconds 1
$dtEnd = [DateTime]::Now
$millseconds = (New-TimeSpan -Start $dtStart -End $dtEnd).TotalMilliseconds
$millseconds | Should BeGreaterThan 1000
}
It "Shoule be works properly when sleeping with Second" {
$dtStart = [DateTime]::Now
Start-Sleep -Milliseconds 1000
$dtEnd = [DateTime]::Now
$millseconds = (New-TimeSpan -Start $dtStart -End $dtEnd).TotalMilliseconds
$millseconds | Should BeGreaterThan 1000
}
}
Describe "Start-Sleep" {
Context "Validate Start-Sleep works properly" {