Skip to content

Commit

Permalink
move param test
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Oct 25, 2024
1 parent a09937f commit 664904e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .aider/prompts/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,21 @@ Describe "Get-DbaDatabase" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Get-DbaDatabase
$expected = $TestConfig.CommonParameters
}
It "Has parameter: <_>" -ForEach $expected {
$command | Should -HaveParameter $PSItem
}
It "Should have exactly the number of expected parameters" {
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Database",
"Confirm",
"WhatIf"
)
}
It "Has parameter: <_>" -ForEach $expected {
$command | Should -HaveParameter $PSItem
}
It "Should have exactly the number of expected parameters" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down

0 comments on commit 664904e

Please sign in to comment.