Skip to content

Commit

Permalink
turns out the scoping was right all along
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Oct 26, 2024
1 parent ffddf03 commit addd41f
Show file tree
Hide file tree
Showing 29 changed files with 88 additions and 88 deletions.
6 changes: 3 additions & 3 deletions .aider/prompts/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ Describe "Get-DbaDatabase" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Get-DbaDatabase
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Database",
Expand All @@ -143,7 +143,7 @@ Describe "Get-DbaDatabase" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}
It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaAgDatabase.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaAgDatabase" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaAgDatabase
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"AvailabilityGroup",
Expand All @@ -31,7 +31,7 @@ Describe "Add-DbaAgDatabase" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaAgListener.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaAgListener" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaAgListener
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"AvailabilityGroup",
Expand All @@ -31,7 +31,7 @@ Describe "Add-DbaAgListener" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaAgReplica.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaAgReplica" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaAgReplica
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Name",
Expand Down Expand Up @@ -39,7 +39,7 @@ Describe "Add-DbaAgReplica" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaComputerCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaComputerCertificate" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaComputerCertificate
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"ComputerName",
"Credential",
"SecurePassword",
Expand All @@ -28,7 +28,7 @@ Describe "Add-DbaComputerCertificate" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaDbMirrorMonitor.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaDbMirrorMonitor" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaDbMirrorMonitor
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"EnableException",
Expand All @@ -22,7 +22,7 @@ Describe "Add-DbaDbMirrorMonitor" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaDbRoleMember.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaDbRoleMember" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaDbRoleMember
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Database",
Expand All @@ -26,7 +26,7 @@ Describe "Add-DbaDbRoleMember" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaExtendedProperty.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaExtendedProperty" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaExtendedProperty
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Database",
Expand All @@ -26,7 +26,7 @@ Describe "Add-DbaExtendedProperty" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
8 changes: 4 additions & 4 deletions tests/Add-DbaPfDataCollectorCounter.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ param(
$ModuleName = "dbatools",
$PSDefaultParameterValues = ($TestConfig = Get-TestConfig).Defaults
)

Describe "Add-DbaPfDataCollectorCounter" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaPfDataCollectorCounter
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"ComputerName",
"Credential",
"CollectorSet",
Expand All @@ -25,8 +26,7 @@ Describe "Add-DbaPfDataCollectorCounter" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
$expected.count | Write-Warning
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaRegServer.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaRegServer" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaRegServer
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"ServerName",
Expand All @@ -32,7 +32,7 @@ Describe "Add-DbaRegServer" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaRegServerGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaRegServerGroup" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaRegServerGroup
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Name",
Expand All @@ -26,7 +26,7 @@ Describe "Add-DbaRegServerGroup" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaReplArticle.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaReplArticle" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaReplArticle
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Database",
Expand All @@ -28,7 +28,7 @@ Describe "Add-DbaReplArticle" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Add-DbaServerRoleMember.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Add-DbaServerRoleMember" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Add-DbaServerRoleMember
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"ServerRole",
Expand All @@ -26,7 +26,7 @@ Describe "Add-DbaServerRoleMember" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Backup-DbaComputerCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Backup-DbaComputerCertificate" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Backup-DbaComputerCertificate
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SecurePassword",
"InputObject",
"Path",
Expand All @@ -23,7 +23,7 @@ Describe "Backup-DbaComputerCertificate" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Backup-DbaDbCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Backup-DbaDbCertificate" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Backup-DbaDbCertificate
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Certificate",
Expand All @@ -30,7 +30,7 @@ Describe "Backup-DbaDbCertificate" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Backup-DbaDbMasterKey.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Backup-DbaDbMasterKey
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"Credential",
Expand All @@ -28,7 +28,7 @@ Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Backup-DbaServiceMasterKey.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Backup-DbaServiceMasterKey" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Backup-DbaServiceMasterKey
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"KeyCredential",
Expand All @@ -25,7 +25,7 @@ Describe "Backup-DbaServiceMasterKey" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Clear-DbaConnectionPool.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Clear-DbaConnectionPool" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Clear-DbaConnectionPool
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"ComputerName",
"Credential",
"EnableException"
Expand All @@ -20,7 +20,7 @@ Describe "Clear-DbaConnectionPool" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Clear-DbaLatchStatistics.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Describe "Clear-DbaLatchStatistics" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Clear-DbaLatchStatistics
$script:expected = $TestConfig.CommonParameters
$script:expected += @(
$expected = $TestConfig.CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
"EnableException",
Expand All @@ -22,7 +22,7 @@ Describe "Clear-DbaLatchStatistics" -Tag "UnitTests" {
$command | Should -HaveParameter $PSItem
}

It "Should have exactly the number of expected parameters" {
It "Should have exactly the number of expected parameters ($($expected.Count))" {
$hasparms = $command.Parameters.Values.Name
Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty
}
Expand Down
Loading

0 comments on commit addd41f

Please sign in to comment.