Files
PowerShell/test/powershell/New-Object.Tests.ps1
T

16 lines
573 B
PowerShell
Raw Normal View History

2015-07-24 10:38:51 -07:00
Describe "New-Object" {
2015-07-15 10:15:39 -07:00
It "should create an object with 4 fields" {
$o = New-Object psobject
$val = $o.GetType()
2015-07-24 10:38:51 -07:00
$val.IsPublic | Should Not BeNullOrEmpty
$val.Name | Should Not BeNullOrEmpty
2015-07-15 10:15:39 -07:00
$val.IsSerializable | Should Not BeNullOrEmpty
2015-07-24 10:38:51 -07:00
$val.BaseType | Should Not BeNullOrEmpty
2015-07-15 10:15:39 -07:00
2015-07-24 10:38:51 -07:00
$val.IsPublic | Should Be $true
2015-07-15 10:15:39 -07:00
$val.IsSerializable | Should Be $false
2015-07-24 10:38:51 -07:00
$val.Name | Should Be 'PSCustomObject'
$val.BaseType | Should Be 'System.Object'
2015-07-15 10:15:39 -07:00
}
2015-07-24 10:38:51 -07:00
}