From 4005348f458e115d7d7c7e0126753e6b09ed46da Mon Sep 17 00:00:00 2001 From: JumpingYang001 Date: Mon, 23 May 2016 20:10:55 -0700 Subject: [PATCH] Update fixes based on James comments for DisplayXML Pester Test --- test/powershell/Format-List.Tests.ps1 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/powershell/Format-List.Tests.ps1 b/test/powershell/Format-List.Tests.ps1 index bd43b01d4..60ccdf9a5 100644 --- a/test/powershell/Format-List.Tests.ps1 +++ b/test/powershell/Format-List.Tests.ps1 @@ -127,10 +127,7 @@ Describe "Format-List DRT basic functionality" -Tags DRT{ It "Format-List with multiple same class object should work" -Pending:($env:TRAVIS_OS_NAME -eq "osx"){ Add-Type -TypeDefinition "public class TestClass{public TestClass(string name,int length){Name = name;Length = length;}public string Name;public int Length;}" - $testobject1 = [TestClass]::New('name1',1) - $testobject2 = [TestClass]::New('name2',2) - $testobject3 = [TestClass]::New('name3',3) - $testobjects = @($testobject1,$testobject2,$testobject3) + $testobjects = [TestClass]::New('name1',1),[TestClass]::New('name2',2),[TestClass]::New('name3',3) $result = $testobjects|Format-List|Out-String $result | Should Match "Name : name1" $result | Should Match "Length : 1" @@ -143,10 +140,7 @@ Describe "Format-List DRT basic functionality" -Tags DRT{ It "Format-List with multiple different class object should work" -Pending:($env:TRAVIS_OS_NAME -eq "osx"){ Add-Type -TypeDefinition "public class TestClass{public TestClass(string name,int length){Name = name;Length = length;}public string Name;public int Length;}" Add-Type -TypeDefinition "public class TestClass2{public TestClass2(string name,string value,int length){Name = name;Value = value; Length = length;}public string Name;public string Value;public int Length;}" - $testobject1 = [TestClass]::New('name1',1) - $testobject2 = [TestClass2]::New('name2',"value2",2) - $testobject3 = [TestClass]::New('name3',3) - $testobjects = @($testobject1,$testobject2,$testobject3) + $testobjects = [TestClass]::New('name1',1),[TestClass2]::New('name2',"value2",2),[TestClass]::New('name3',3) $result = $testobjects|Format-List|Out-String $result | Should Match "Name : name1" $result | Should Match "Length : 1"