diff --git a/test/powershell/Get-Date.Tests.ps1 b/test/powershell/Get-Date.Tests.ps1 index 0f481bdae..7b643de09 100644 --- a/test/powershell/Get-Date.Tests.ps1 +++ b/test/powershell/Get-Date.Tests.ps1 @@ -13,8 +13,8 @@ Describe "Get-Date DRT Unit Tests" -Tags DRT { } It "using -displayhint produces the correct output" { - $newLine = [Environment]::NewLine - Get-date -Date:"Jan 1, 2020" -DisplayHint:$([Microsoft.PowerShell.Commands.DisplayHintType]::Date) | Out-String | Should be $newLine"Wednesday, January 1, 2020$newLine$newLine$newLine" + $d = Get-date -Date:"Jan 1, 2020" -DisplayHint Date | Out-String + $d.Trim() | Should be "Wednesday, January 1, 2020" } It "using -format produces the correct output" { @@ -46,9 +46,9 @@ Describe "Get-Date DRT Unit Tests" -Tags DRT { It "the LastWriteTime alias works with pipeline input" { $folder = "GetDateTest" - $tempPath = $PSScriptRoot - $pathString = Join-Path -Path $tempPath -ChildPath $folder - New-Item -Path $tempPath -Name $folder -ItemType directory -Force + #$tempPath = $TestDrive + $pathString = Join-Path -Path $TestDrive -ChildPath $folder + New-Item -Path $TestDrive -Name $folder -ItemType directory -Force for($i = 0; $i -lt 10; $i++) { $temp = [guid]::NewGuid() diff --git a/test/powershell/Start-Sleep.Tests.ps1 b/test/powershell/Start-Sleep.Tests.ps1 index 4699bb536..e97cfad80 100644 --- a/test/powershell/Start-Sleep.Tests.ps1 +++ b/test/powershell/Start-Sleep.Tests.ps1 @@ -1,5 +1,5 @@ Describe "Start-Sleep DRT Unit Tests" -Tags DRT{ - It "Shoule be works properly when sleeping with Second" { + It "Should be works properly when sleeping with Second" { $dtStart = [DateTime]::Now Start-Sleep -Seconds 1 $dtEnd = [DateTime]::Now @@ -7,7 +7,7 @@ Describe "Start-Sleep DRT Unit Tests" -Tags DRT{ $millseconds | Should BeGreaterThan 1000 } - It "Shoule be works properly when sleeping with Second" { + It "Should be works properly when sleeping with Milliseconds" { $dtStart = [DateTime]::Now Start-Sleep -Milliseconds 1000 $dtEnd = [DateTime]::Now