From 01af13ce37245f3066637a7904ef42cb2fb4ad02 Mon Sep 17 00:00:00 2001 From: TingLiu6 Date: Sun, 24 Apr 2016 20:14:40 -0700 Subject: [PATCH] Fix the issue of CR for Get-Random --- test/powershell/Get-Random.Tests.ps1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/powershell/Get-Random.Tests.ps1 b/test/powershell/Get-Random.Tests.ps1 index f62cbebef..ac2088975 100644 --- a/test/powershell/Get-Random.Tests.ps1 +++ b/test/powershell/Get-Random.Tests.ps1 @@ -241,9 +241,13 @@ Describe "Get-Random DRT Unit Tests" -Tags DRT{ } It "Tests for setting the seed" { - $result1 = get-random -SetSeed 123; get-random; - $result2 = get-random -SetSeed 123; get-random; - $result1 | Should Be $result2 + $result1 = (get-random -SetSeed 123), (get-random) + $result2 = (get-random -SetSeed 123), (get-random) + $result1.Length | Should Be $result2.Length + for($i = 0;$i -lt $result1.Length;$i++) + { + $result1[$i] | Should Be $result2[$i] + } } }