bbebf2f76a
- 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`
25 lines
818 B
PowerShell
25 lines
818 B
PowerShell
Describe "DotNetAPI" {
|
|
$posh_E = 2.718281828459045
|
|
$posh_pi = 3.14159265358979
|
|
|
|
It "Should be able to use static .NET classes and get a constant" {
|
|
[System.Math]::E | Should Match $posh_E.ToString()
|
|
[System.Math]::PI | Should Match $posh_pi.ToString()
|
|
}
|
|
|
|
It "Should be able to invoke a method" {
|
|
[System.Environment]::GetEnvironmentVariable("PATH") | Should Be $env:PATH
|
|
}
|
|
|
|
It "Should not require 'system' in front of static classes" {
|
|
[Environment]::CommandLine | Should Be ([System.Environment]::CommandLine)
|
|
|
|
[Math]::E | Should Be ([System.Math]::E)
|
|
}
|
|
|
|
It "Should be able to create a new instance of a .Net object" {
|
|
[System.Guid]$guidVal = [System.Guid]::NewGuid()
|
|
|
|
$guidVal.GetType().Name | Should Be "Guid"
|
|
}
|
|
}
|