Update Format-Custom Tree object Pester Test

This commit is contained in:
JumpingYang001 2016-05-19 02:09:59 -07:00
parent 1504f9b64f
commit 0dc339f579

View File

@ -198,8 +198,8 @@ class MyContainer1
$objectList = @($c1,$c2,$cDeep,$cx)
$result = $objectList | Format-Custom | Out-String
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$result | Should Be $expectedResult
}
@ -220,8 +220,8 @@ class MyContainer1
$objectList = @($c)
$result = $objectList | Format-Custom | Out-String
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$result | Should Be $expectedResult
}
@ -263,12 +263,12 @@ class MyContainer1
$objectList = @($root)
$result = $objectList | Format-Custom | Out-String
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$result | Should Be $expectedResult
}
It "Format-Custom with Tree Object should work" -Pending:($env:TRAVIS_OS_NAME -eq "osx") {
It "Format-Custom with Leaf Only Data should work" -Pending:($env:TRAVIS_OS_NAME -eq "osx") {
$expectedResult=@"
class MyLeaf1
{
@ -293,8 +293,8 @@ class MyLeaf2
$objectList = @($leaf1,$leaf2)
$result = $objectList | Format-Custom | Out-String
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n",""
$result = $result -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$expectedResult = $expectedResult -replace "{","" -replace "}","" -replace " ","" -replace "`n","" -replace "\r",""
$result | Should Be $expectedResult
}
}