Pester 5 Prep
This commit is contained in:
@@ -6,8 +6,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
||||
|
||||
Context "$global:function::Parameter Unit Tests" {
|
||||
|
||||
it "$global:function should have exactly 15 parameters defined" {
|
||||
(get-command $global:function).Parameters.Count | Should -Be 15
|
||||
It "$global:function should have exactly 15 parameters defined" {
|
||||
(Get-Command $global:function).Parameters.Count | Should -Be 15
|
||||
}
|
||||
|
||||
$ParameterTestCases = @(
|
||||
@@ -36,17 +36,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
||||
}
|
||||
|
||||
default {
|
||||
$true | should be $false -Because "No Validation Selected. Review test cases"
|
||||
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
It "Interval Parameter should have a Min value of 60" {
|
||||
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60
|
||||
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
|
||||
}
|
||||
|
||||
It "Interval Parameter should have a Max value of 2678400" {
|
||||
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400
|
||||
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user