Open
Description
Because currently the tests like this fail:
Describe "Write-Message" -Tag "UnitTests" {
BeforeDiscovery {
$command = Get-Command -Name Write-Message
$expected = $expectedParams
}
Context "Parameter validation" {
BeforeAll {
$command = Get-Command -Name Write-Message
$expected = $expectedParams
}
It "Has parameter: <_>" -ForEach $expected {
$command | Should -HaveParameter $PSItem
}
It "Should have exactly the number of expected parameters $($expected.Count)" {
$hasparms = $command.Parameters.Values.Name
#$hasparms.Count | Should -BeExactly $expected.Count
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
}
}
Metadata
Metadata
Assignees
Labels
No labels