2016-03-04 23:48:30 +01:00
|
|
|
Describe "New-Object" {
|
2015-07-15 19:15:39 +02:00
|
|
|
It "should create an object with 4 fields" {
|
2016-03-04 23:52:27 +01:00
|
|
|
$o = New-Object psobject
|
|
|
|
$val = $o.GetType()
|
2015-07-15 19:15:39 +02:00
|
|
|
|
2016-03-04 23:52:27 +01:00
|
|
|
$val.IsPublic | Should Not BeNullOrEmpty
|
|
|
|
$val.Name | Should Not BeNullOrEmpty
|
|
|
|
$val.IsSerializable | Should Not BeNullOrEmpty
|
|
|
|
$val.BaseType | Should Not BeNullOrEmpty
|
2015-07-15 19:15:39 +02:00
|
|
|
|
2016-03-04 23:52:27 +01:00
|
|
|
$val.IsPublic | Should Be $true
|
|
|
|
$val.IsSerializable | Should Be $false
|
|
|
|
$val.Name | Should Be 'PSCustomObject'
|
|
|
|
$val.BaseType | Should Be 'System.Object'
|
2015-07-15 19:15:39 +02:00
|
|
|
}
|
2015-07-24 19:38:51 +02:00
|
|
|
}
|