Skip to content

Commit

Permalink
new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Oct 18, 2024
1 parent 2b69f17 commit 1386958
Show file tree
Hide file tree
Showing 276 changed files with 2,250 additions and 2,250 deletions.
6 changes: 3 additions & 3 deletions tests/Move-DbaRegServerGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ Describe "Move-DbaRegServerGroup" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential
}
It "Should have Group as a parameter" {
$CommandUnderTest | Should -HaveParameter Group -Type String[]
$CommandUnderTest | Should -HaveParameter Group -Type System.String[]
}
It "Should have NewGroup as a parameter" {
$CommandUnderTest | Should -HaveParameter NewGroup -Type String
$CommandUnderTest | Should -HaveParameter NewGroup -Type System.String
}
It "Should have InputObject as a parameter" {
$CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]
}
It "Should have EnableException as a parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
$CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter
}
}

Expand Down
16 changes: 8 additions & 8 deletions tests/New-DbaAgentAlertCategory.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ Describe "New-DbaAgentAlertCategory" {
BeforeAll {
$CommandUnderTest = Get-Command New-DbaAgentAlertCategory
}
It "Should have SqlInstance as a non-mandatory parameter of type DbaInstanceParameter[]" {
$CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false
It "Should have SqlInstance as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" {
$CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false
}
It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false
It "Should have SqlCredential as a non-mandatory parameter of type System.Management.Automation.PSCredential" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false
}
It "Should have Category as a non-mandatory parameter of type String[]" {
$CommandUnderTest | Should -HaveParameter Category -Type String[] -Mandatory:$false
It "Should have Category as a non-mandatory parameter of type System.String[]" {
$CommandUnderTest | Should -HaveParameter Category -Type System.String[] -Mandatory:$false
}
It "Should have Force as a non-mandatory switch parameter" {
$CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false
}
It "Should have EnableException as a non-mandatory switch parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false
$CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false
}
}

Expand Down
38 changes: 19 additions & 19 deletions tests/New-DbaAgentJob.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,61 @@ Describe "New-DbaAgentJob" {
$CommandUnderTest = Get-Command New-DbaAgentJob
}
It "Should have SqlInstance parameter" {
$CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false
$CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false
}
It "Should have SqlCredential parameter" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false
$CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false
}
It "Should have Job parameter" {
$CommandUnderTest | Should -HaveParameter Job -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Job -Type System.String -Mandatory:$false
}
It "Should have Schedule parameter" {
$CommandUnderTest | Should -HaveParameter Schedule -Type Object[] -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Schedule -Type System.Object[] -Mandatory:$false
}
It "Should have ScheduleId parameter" {
$CommandUnderTest | Should -HaveParameter ScheduleId -Type Int32[] -Mandatory:$false
$CommandUnderTest | Should -HaveParameter ScheduleId -Type System.Int32[] -Mandatory:$false
}
It "Should have Disabled parameter" {
$CommandUnderTest | Should -HaveParameter Disabled -Type Switch -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.Switch -Mandatory:$false
}
It "Should have Description parameter" {
$CommandUnderTest | Should -HaveParameter Description -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Description -Type System.String -Mandatory:$false
}
It "Should have StartStepId parameter" {
$CommandUnderTest | Should -HaveParameter StartStepId -Type Int32 -Mandatory:$false
$CommandUnderTest | Should -HaveParameter StartStepId -Type System.Int32 -Mandatory:$false
}
It "Should have Category parameter" {
$CommandUnderTest | Should -HaveParameter Category -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Category -Type System.String -Mandatory:$false
}
It "Should have OwnerLogin parameter" {
$CommandUnderTest | Should -HaveParameter OwnerLogin -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter OwnerLogin -Type System.String -Mandatory:$false
}
It "Should have EventLogLevel parameter" {
$CommandUnderTest | Should -HaveParameter EventLogLevel -Type Object -Mandatory:$false
$CommandUnderTest | Should -HaveParameter EventLogLevel -Type System.Object -Mandatory:$false
}
It "Should have EmailLevel parameter" {
$CommandUnderTest | Should -HaveParameter EmailLevel -Type Object -Mandatory:$false
$CommandUnderTest | Should -HaveParameter EmailLevel -Type System.Object -Mandatory:$false
}
It "Should have PageLevel parameter" {
$CommandUnderTest | Should -HaveParameter PageLevel -Type Object -Mandatory:$false
$CommandUnderTest | Should -HaveParameter PageLevel -Type System.Object -Mandatory:$false
}
It "Should have EmailOperator parameter" {
$CommandUnderTest | Should -HaveParameter EmailOperator -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter EmailOperator -Type System.String -Mandatory:$false
}
It "Should have NetsendOperator parameter" {
$CommandUnderTest | Should -HaveParameter NetsendOperator -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter NetsendOperator -Type System.String -Mandatory:$false
}
It "Should have PageOperator parameter" {
$CommandUnderTest | Should -HaveParameter PageOperator -Type String -Mandatory:$false
$CommandUnderTest | Should -HaveParameter PageOperator -Type System.String -Mandatory:$false
}
It "Should have DeleteLevel parameter" {
$CommandUnderTest | Should -HaveParameter DeleteLevel -Type Object -Mandatory:$false
$CommandUnderTest | Should -HaveParameter DeleteLevel -Type System.Object -Mandatory:$false
}
It "Should have Force parameter" {
$CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.Switch -Mandatory:$false
}
It "Should have EnableException parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false
$CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false
}
}

Expand Down
8 changes: 4 additions & 4 deletions tests/New-DbaAgentJobCategory.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ Describe "New-DbaAgentJobCategory" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential
}
It "Should have Category parameter" {
$CommandUnderTest | Should -HaveParameter Category -Type String[]
$CommandUnderTest | Should -HaveParameter Category -Type System.String[]
}
It "Should have CategoryType parameter" {
$CommandUnderTest | Should -HaveParameter CategoryType -Type String
$CommandUnderTest | Should -HaveParameter CategoryType -Type System.String
}
It "Should have Force parameter" {
$CommandUnderTest | Should -HaveParameter Force -Type Switch
$CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter
}
It "Should have EnableException parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
$CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter
}
}

Expand Down
42 changes: 21 additions & 21 deletions tests/New-DbaAgentJobStep.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,67 @@ Describe "New-DbaAgentJobStep" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential
}
It "Should have Job parameter" {
$CommandUnderTest | Should -HaveParameter Job -Type Object[]
$CommandUnderTest | Should -HaveParameter Job -Type System.Object[]
}
It "Should have StepId parameter" {
$CommandUnderTest | Should -HaveParameter StepId -Type Int32
$CommandUnderTest | Should -HaveParameter StepId -Type System.Int32
}
It "Should have StepName parameter" {
$CommandUnderTest | Should -HaveParameter StepName -Type String
$CommandUnderTest | Should -HaveParameter StepName -Type System.String
}
It "Should have Subsystem parameter" {
$CommandUnderTest | Should -HaveParameter Subsystem -Type String
$CommandUnderTest | Should -HaveParameter Subsystem -Type System.String
}
It "Should have SubsystemServer parameter" {
$CommandUnderTest | Should -HaveParameter SubsystemServer -Type String
$CommandUnderTest | Should -HaveParameter SubsystemServer -Type System.String
}
It "Should have Command parameter" {
$CommandUnderTest | Should -HaveParameter Command -Type String
$CommandUnderTest | Should -HaveParameter Command -Type System.String
}
It "Should have CmdExecSuccessCode parameter" {
$CommandUnderTest | Should -HaveParameter CmdExecSuccessCode -Type Int32
$CommandUnderTest | Should -HaveParameter CmdExecSuccessCode -Type System.Int32
}
It "Should have OnSuccessAction parameter" {
$CommandUnderTest | Should -HaveParameter OnSuccessAction -Type String
$CommandUnderTest | Should -HaveParameter OnSuccessAction -Type System.String
}
It "Should have OnSuccessStepId parameter" {
$CommandUnderTest | Should -HaveParameter OnSuccessStepId -Type Int32
$CommandUnderTest | Should -HaveParameter OnSuccessStepId -Type System.Int32
}
It "Should have OnFailAction parameter" {
$CommandUnderTest | Should -HaveParameter OnFailAction -Type String
$CommandUnderTest | Should -HaveParameter OnFailAction -Type System.String
}
It "Should have OnFailStepId parameter" {
$CommandUnderTest | Should -HaveParameter OnFailStepId -Type Int32
$CommandUnderTest | Should -HaveParameter OnFailStepId -Type System.Int32
}
It "Should have Database parameter" {
$CommandUnderTest | Should -HaveParameter Database -Type String
$CommandUnderTest | Should -HaveParameter Database -Type System.String
}
It "Should have DatabaseUser parameter" {
$CommandUnderTest | Should -HaveParameter DatabaseUser -Type String
$CommandUnderTest | Should -HaveParameter DatabaseUser -Type System.String
}
It "Should have RetryAttempts parameter" {
$CommandUnderTest | Should -HaveParameter RetryAttempts -Type Int32
$CommandUnderTest | Should -HaveParameter RetryAttempts -Type System.Int32
}
It "Should have RetryInterval parameter" {
$CommandUnderTest | Should -HaveParameter RetryInterval -Type Int32
$CommandUnderTest | Should -HaveParameter RetryInterval -Type System.Int32
}
It "Should have OutputFileName parameter" {
$CommandUnderTest | Should -HaveParameter OutputFileName -Type String
$CommandUnderTest | Should -HaveParameter OutputFileName -Type System.String
}
It "Should have Insert parameter" {
$CommandUnderTest | Should -HaveParameter Insert -Type Switch
$CommandUnderTest | Should -HaveParameter Insert -Type System.Management.Automation.SwitchParameter
}
It "Should have Flag parameter" {
$CommandUnderTest | Should -HaveParameter Flag -Type String[]
$CommandUnderTest | Should -HaveParameter Flag -Type System.String[]
}
It "Should have ProxyName parameter" {
$CommandUnderTest | Should -HaveParameter ProxyName -Type String
$CommandUnderTest | Should -HaveParameter ProxyName -Type System.String
}
It "Should have Force parameter" {
$CommandUnderTest | Should -HaveParameter Force -Type Switch
$CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter
}
It "Should have EnableException parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
$CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter
}
}

Expand Down
32 changes: 16 additions & 16 deletions tests/New-DbaAgentOperator.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,52 @@ Describe "New-DbaAgentOperator" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential
}
It "Should have Operator parameter" {
$CommandUnderTest | Should -HaveParameter Operator -Type String
$CommandUnderTest | Should -HaveParameter Operator -Type System.String
}
It "Should have EmailAddress parameter" {
$CommandUnderTest | Should -HaveParameter EmailAddress -Type String
$CommandUnderTest | Should -HaveParameter EmailAddress -Type System.String
}
It "Should have NetSendAddress parameter" {
$CommandUnderTest | Should -HaveParameter NetSendAddress -Type String
$CommandUnderTest | Should -HaveParameter NetSendAddress -Type System.String
}
It "Should have PagerAddress parameter" {
$CommandUnderTest | Should -HaveParameter PagerAddress -Type String
$CommandUnderTest | Should -HaveParameter PagerAddress -Type System.String
}
It "Should have PagerDay parameter" {
$CommandUnderTest | Should -HaveParameter PagerDay -Type String
$CommandUnderTest | Should -HaveParameter PagerDay -Type System.String
}
It "Should have SaturdayStartTime parameter" {
$CommandUnderTest | Should -HaveParameter SaturdayStartTime -Type String
$CommandUnderTest | Should -HaveParameter SaturdayStartTime -Type System.String
}
It "Should have SaturdayEndTime parameter" {
$CommandUnderTest | Should -HaveParameter SaturdayEndTime -Type String
$CommandUnderTest | Should -HaveParameter SaturdayEndTime -Type System.String
}
It "Should have SundayStartTime parameter" {
$CommandUnderTest | Should -HaveParameter SundayStartTime -Type String
$CommandUnderTest | Should -HaveParameter SundayStartTime -Type System.String
}
It "Should have SundayEndTime parameter" {
$CommandUnderTest | Should -HaveParameter SundayEndTime -Type String
$CommandUnderTest | Should -HaveParameter SundayEndTime -Type System.String
}
It "Should have WeekdayStartTime parameter" {
$CommandUnderTest | Should -HaveParameter WeekdayStartTime -Type String
$CommandUnderTest | Should -HaveParameter WeekdayStartTime -Type System.String
}
It "Should have WeekdayEndTime parameter" {
$CommandUnderTest | Should -HaveParameter WeekdayEndTime -Type String
$CommandUnderTest | Should -HaveParameter WeekdayEndTime -Type System.String
}
It "Should have IsFailsafeOperator parameter" {
$CommandUnderTest | Should -HaveParameter IsFailsafeOperator -Type Switch
$CommandUnderTest | Should -HaveParameter IsFailsafeOperator -Type System.Management.Automation.SwitchParameter
}
It "Should have FailsafeNotificationMethod parameter" {
$CommandUnderTest | Should -HaveParameter FailsafeNotificationMethod -Type String
$CommandUnderTest | Should -HaveParameter FailsafeNotificationMethod -Type System.String
}
It "Should have Force parameter" {
$CommandUnderTest | Should -HaveParameter Force -Type Switch
$CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter
}
It "Should have InputObject parameter" {
$CommandUnderTest | Should -HaveParameter InputObject -Type Server[]
$CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Server[]
}
It "Should have EnableException parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
$CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter
}
}

Expand Down
Loading

0 comments on commit 1386958

Please sign in to comment.