diff --git a/test/powershell/Start-Sleep.Tests.ps1 b/test/powershell/Start-Sleep.Tests.ps1 index b5136932ab..4699bb5369 100644 --- a/test/powershell/Start-Sleep.Tests.ps1 +++ b/test/powershell/Start-Sleep.Tests.ps1 @@ -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" {