Merge pull request #737 from PowerShell/PesterTest_Temp

Improve Pester Test for New-object #476
This commit is contained in:
Andy Schwartzmeyer committed 2016-03-24 21:16:34 -07:00
commit 15495875b4
1 file changed
+18
+18
View File
@@ -13,4 +13,22 @@ Describe "New-Object" {
$val.Name | Should Be 'PSCustomObject'
$val.BaseType | Should Be 'System.Object'
}
It "should create an object with using Property switch" {
$hash = @{
FirstVal = 'test1'
SecondVal = 'test2'
}
$o = New-Object psobject -Property $hash
$o.FirstVal | Should Be 'test1'
$o.SecondVal | Should Be 'test2'
}
It "should create a .Net object with using ArgumentList switch" {
$o = New-Object -TypeName System.Version -ArgumentList "1.2.3.4"
$o.GetType() | Should Be ([System.Version])
$o | Should Be "1.2.3.4"
}
}