From 2b54e7a70946b3c1137e5e678386cf734ef786f6 Mon Sep 17 00:00:00 2001 From: TingLiu6 Date: Wed, 20 Apr 2016 01:28:43 -0700 Subject: [PATCH 1/2] Add Unit Test for Get-Culture --- test/powershell/Get-Culture.Tests.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/powershell/Get-Culture.Tests.ps1 b/test/powershell/Get-Culture.Tests.ps1 index 651e96920b..678129cbee 100644 --- a/test/powershell/Get-Culture.Tests.ps1 +++ b/test/powershell/Get-Culture.Tests.ps1 @@ -1,3 +1,12 @@ +Describe "Get-Culture DRT Unit Tests" -Tags DRT{ + It "Should works proper with get-culture" { + $results = get-Culture + $results | Should Not BeNullOrEmpty + $results[0].GetType() | Should Be CultureInfo + $results[0].Name | Should Be $PSCulture + } +} + Describe "Get-Culture" { It "Should return a type of CultureInfo for Get-Culture cmdlet" { From e67043d99fe79c525ad71a514dae4b7cb0370270 Mon Sep 17 00:00:00 2001 From: TingLiu6 Date: Thu, 21 Apr 2016 23:46:21 -0700 Subject: [PATCH 2/2] Fix the issue of CR fot Get-Culture --- test/powershell/Get-Culture.Tests.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/powershell/Get-Culture.Tests.ps1 b/test/powershell/Get-Culture.Tests.ps1 index 678129cbee..f886b57d65 100644 --- a/test/powershell/Get-Culture.Tests.ps1 +++ b/test/powershell/Get-Culture.Tests.ps1 @@ -1,8 +1,7 @@ Describe "Get-Culture DRT Unit Tests" -Tags DRT{ It "Should works proper with get-culture" { $results = get-Culture - $results | Should Not BeNullOrEmpty - $results[0].GetType() | Should Be CultureInfo + $results -is "System.Globalization.CultureInfo" | Should be $true $results[0].Name | Should Be $PSCulture } }