PowerShell/test/powershell/New-Object.Tests.ps1
Andrew Schwartzmeyer bbebf2f76a Reorganize tests
- Pester source code moved to `test/Pester`, deleted `ext-src`.
- Pester tests (.ps1 files) moved to `test/powershell`
- xUnit tests (.cs files) moved to `test/csharp`
- Third-party script test moved to `test/shebang`
2016-01-14 17:00:06 -08:00

17 lines
573 B
PowerShell

Describe "New-Object" {
It "should create an object with 4 fields" {
$o = New-Object psobject
$val = $o.GetType()
$val.IsPublic | Should Not BeNullOrEmpty
$val.Name | Should Not BeNullOrEmpty
$val.IsSerializable | Should Not BeNullOrEmpty
$val.BaseType | Should Not BeNullOrEmpty
$val.IsPublic | Should Be $true
$val.IsSerializable | Should Be $false
$val.Name | Should Be 'PSCustomObject'
$val.BaseType | Should Be 'System.Object'
}
}