From 9ed1d89978eee27b153cf118e9357adeb13983bd Mon Sep 17 00:00:00 2001 From: JumpingYang001 Date: Sun, 29 May 2016 23:21:36 -0700 Subject: [PATCH] Add NewObjectDRTTestsV2 Pester Unit Test --- test/powershell/New-Object.Tests.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/powershell/New-Object.Tests.ps1 b/test/powershell/New-Object.Tests.ps1 index 5c4bac2d5..35bf0d01d 100644 --- a/test/powershell/New-Object.Tests.ps1 +++ b/test/powershell/New-Object.Tests.ps1 @@ -144,4 +144,9 @@ Describe "New-Object DRT basic functionality" -Tags DRT{ $_.FullyQualifiedErrorId | Should be "TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand" } } + + It "New-Object with TypeName and Property parameter should work"{ + $result = New-Object -TypeName PSObject -property @{foo=123} + $result.foo | Should Be 123 + } } \ No newline at end of file