Pester 5 Prep
This commit is contained in:
@@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[
|
||||
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
||||
|
||||
Context "$global:function::Parameter Unit Tests" {
|
||||
it "$global:function should have exactly 20 parameters defined" {
|
||||
(get-command $global:function).Parameters.Count | Should -Be 20
|
||||
It "$global:function should have exactly 20 parameters defined" {
|
||||
(Get-Command $global:function).Parameters.Count | Should -Be 20
|
||||
}
|
||||
|
||||
$ParameterTestCases = @(
|
||||
@@ -55,7 +55,7 @@ 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
||||
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'None'
|
||||
}
|
||||
|
||||
it "Commit Policy Timeout should have a minimum value of 300 and max value of 86400" {
|
||||
It "Commit Policy Timeout should have a minimum value of 300 and max value of 86400" {
|
||||
(Get-Command $global:function).Parameters['commitPolicyTimeout'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 300
|
||||
(Get-Command $global:function).Parameters['commitPolicyTimeout'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 86400
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user