diff --git a/tests/Move-DbaRegServerGroup.Tests.ps1 b/tests/Move-DbaRegServerGroup.Tests.ps1 index a3d99df52b..a315c418d0 100644 --- a/tests/Move-DbaRegServerGroup.Tests.ps1 +++ b/tests/Move-DbaRegServerGroup.Tests.ps1 @@ -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 } } diff --git a/tests/New-DbaAgentAlertCategory.Tests.ps1 b/tests/New-DbaAgentAlertCategory.Tests.ps1 index 2b50059244..693950e462 100644 --- a/tests/New-DbaAgentAlertCategory.Tests.ps1 +++ b/tests/New-DbaAgentAlertCategory.Tests.ps1 @@ -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 } } diff --git a/tests/New-DbaAgentJob.Tests.ps1 b/tests/New-DbaAgentJob.Tests.ps1 index 7b3e6c4376..6f9197bd46 100644 --- a/tests/New-DbaAgentJob.Tests.ps1 +++ b/tests/New-DbaAgentJob.Tests.ps1 @@ -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 } } diff --git a/tests/New-DbaAgentJobCategory.Tests.ps1 b/tests/New-DbaAgentJobCategory.Tests.ps1 index b17bbe7809..a6fe78b973 100644 --- a/tests/New-DbaAgentJobCategory.Tests.ps1 +++ b/tests/New-DbaAgentJobCategory.Tests.ps1 @@ -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 } } diff --git a/tests/New-DbaAgentJobStep.Tests.ps1 b/tests/New-DbaAgentJobStep.Tests.ps1 index a92c268031..d8270e3eda 100644 --- a/tests/New-DbaAgentJobStep.Tests.ps1 +++ b/tests/New-DbaAgentJobStep.Tests.ps1 @@ -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 } } diff --git a/tests/New-DbaAgentOperator.Tests.ps1 b/tests/New-DbaAgentOperator.Tests.ps1 index 4773af0318..ec5f7b4f3e 100644 --- a/tests/New-DbaAgentOperator.Tests.ps1 +++ b/tests/New-DbaAgentOperator.Tests.ps1 @@ -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 } } diff --git a/tests/New-DbaAgentProxy.Tests.ps1 b/tests/New-DbaAgentProxy.Tests.ps1 index 5a9d09bec7..63759994bf 100644 --- a/tests/New-DbaAgentProxy.Tests.ps1 +++ b/tests/New-DbaAgentProxy.Tests.ps1 @@ -12,34 +12,34 @@ Describe "New-DbaAgentProxy" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have ProxyCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter ProxyCredential -Type String[] + $CommandUnderTest | Should -HaveParameter ProxyCredential -Type System.String[] } It "Should have SubSystem as a parameter" { - $CommandUnderTest | Should -HaveParameter SubSystem -Type String[] + $CommandUnderTest | Should -HaveParameter SubSystem -Type System.String[] } It "Should have Description as a parameter" { - $CommandUnderTest | Should -HaveParameter Description -Type String + $CommandUnderTest | Should -HaveParameter Description -Type System.String } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have ServerRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerRole -Type String[] + $CommandUnderTest | Should -HaveParameter ServerRole -Type System.String[] } It "Should have MsdbRole as a parameter" { - $CommandUnderTest | Should -HaveParameter MsdbRole -Type String[] + $CommandUnderTest | Should -HaveParameter MsdbRole -Type System.String[] } It "Should have Disabled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Disabled -Type Switch + $CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaAgentSchedule.Tests.ps1 b/tests/New-DbaAgentSchedule.Tests.ps1 index cc1b732784..8b12de54bb 100644 --- a/tests/New-DbaAgentSchedule.Tests.ps1 +++ b/tests/New-DbaAgentSchedule.Tests.ps1 @@ -10,58 +10,58 @@ Describe "New-DbaAgentSchedule Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command New-DbaAgentSchedule } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] -Mandatory:$false } It "Should have Schedule as a parameter" { - $CommandUnderTest | Should -HaveParameter Schedule -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Schedule -Type System.Object -Mandatory:$false } It "Should have Disabled as a parameter" { - $CommandUnderTest | Should -HaveParameter Disabled -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have FrequencyType as a parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyType -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyType -Type System.Object -Mandatory:$false } It "Should have FrequencyInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyInterval -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyInterval -Type System.Object[] -Mandatory:$false } It "Should have FrequencySubdayType as a parameter" { - $CommandUnderTest | Should -HaveParameter FrequencySubdayType -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencySubdayType -Type System.Object -Mandatory:$false } It "Should have FrequencySubdayInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter FrequencySubdayInterval -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencySubdayInterval -Type System.Int32 -Mandatory:$false } It "Should have FrequencyRelativeInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyRelativeInterval -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyRelativeInterval -Type System.Object -Mandatory:$false } It "Should have FrequencyRecurrenceFactor as a parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyRecurrenceFactor -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyRecurrenceFactor -Type System.Int32 -Mandatory:$false } It "Should have StartDate as a parameter" { - $CommandUnderTest | Should -HaveParameter StartDate -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StartDate -Type System.String -Mandatory:$false } It "Should have EndDate as a parameter" { - $CommandUnderTest | Should -HaveParameter EndDate -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EndDate -Type System.String -Mandatory:$false } It "Should have StartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter StartTime -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StartTime -Type System.String -Mandatory:$false } It "Should have EndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter EndTime -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EndTime -Type System.String -Mandatory:$false } It "Should have Owner as a parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Owner -Type System.String -Mandatory:$false } It "Should have Force as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/New-DbaAvailabilityGroup.Tests.ps1 b/tests/New-DbaAvailabilityGroup.Tests.ps1 index 29f5e27597..b221272942 100644 --- a/tests/New-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/New-DbaAvailabilityGroup.Tests.ps1 @@ -6,106 +6,106 @@ Describe "New-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command New-DbaAvailabilityGroup } It "Should have Primary as a parameter" { - $CommandUnderTest | Should -HaveParameter Primary -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Primary -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have PrimarySqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter PrimarySqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter PrimarySqlCredential -Type System.Management.Automation.PSCredential } It "Should have Secondary as a parameter" { - $CommandUnderTest | Should -HaveParameter Secondary -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Secondary -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SecondarySqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type System.Management.Automation.PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have IsContained as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsContained -Type Switch + $CommandUnderTest | Should -HaveParameter IsContained -Type System.Management.Automation.SwitchParameter } It "Should have ReuseSystemDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ReuseSystemDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter ReuseSystemDatabases -Type System.Management.Automation.SwitchParameter } It "Should have DtcSupport as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DtcSupport -Type Switch + $CommandUnderTest | Should -HaveParameter DtcSupport -Type System.Management.Automation.SwitchParameter } It "Should have ClusterType as a parameter" { - $CommandUnderTest | Should -HaveParameter ClusterType -Type String + $CommandUnderTest | Should -HaveParameter ClusterType -Type System.String } It "Should have AutomatedBackupPreference as a parameter" { - $CommandUnderTest | Should -HaveParameter AutomatedBackupPreference -Type String + $CommandUnderTest | Should -HaveParameter AutomatedBackupPreference -Type System.String } It "Should have FailureConditionLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter FailureConditionLevel -Type String + $CommandUnderTest | Should -HaveParameter FailureConditionLevel -Type System.String } It "Should have HealthCheckTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter HealthCheckTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter HealthCheckTimeout -Type System.Int32 } It "Should have Basic as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Basic -Type Switch + $CommandUnderTest | Should -HaveParameter Basic -Type System.Management.Automation.SwitchParameter } It "Should have DatabaseHealthTrigger as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseHealthTrigger -Type Switch + $CommandUnderTest | Should -HaveParameter DatabaseHealthTrigger -Type System.Management.Automation.SwitchParameter } It "Should have Passthru as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have SharedPath as a parameter" { - $CommandUnderTest | Should -HaveParameter SharedPath -Type String + $CommandUnderTest | Should -HaveParameter SharedPath -Type System.String } It "Should have UseLastBackup as a switch parameter" { - $CommandUnderTest | Should -HaveParameter UseLastBackup -Type Switch + $CommandUnderTest | Should -HaveParameter UseLastBackup -Type System.Management.Automation.SwitchParameter } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have AvailabilityMode as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityMode -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityMode -Type System.String } It "Should have FailoverMode as a parameter" { - $CommandUnderTest | Should -HaveParameter FailoverMode -Type String + $CommandUnderTest | Should -HaveParameter FailoverMode -Type System.String } It "Should have BackupPriority as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupPriority -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupPriority -Type System.Int32 } It "Should have ConnectionModeInPrimaryRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionModeInPrimaryRole -Type String + $CommandUnderTest | Should -HaveParameter ConnectionModeInPrimaryRole -Type System.String } It "Should have ConnectionModeInSecondaryRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionModeInSecondaryRole -Type String + $CommandUnderTest | Should -HaveParameter ConnectionModeInSecondaryRole -Type System.String } It "Should have SeedingMode as a parameter" { - $CommandUnderTest | Should -HaveParameter SeedingMode -Type String + $CommandUnderTest | Should -HaveParameter SeedingMode -Type System.String } It "Should have Endpoint as a parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String } It "Should have EndpointUrl as a parameter" { - $CommandUnderTest | Should -HaveParameter EndpointUrl -Type String[] + $CommandUnderTest | Should -HaveParameter EndpointUrl -Type System.String[] } It "Should have Certificate as a parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type String + $CommandUnderTest | Should -HaveParameter Certificate -Type System.String } It "Should have ConfigureXESession as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ConfigureXESession -Type Switch + $CommandUnderTest | Should -HaveParameter ConfigureXESession -Type System.Management.Automation.SwitchParameter } It "Should have IPAddress as a parameter" { - $CommandUnderTest | Should -HaveParameter IPAddress -Type IPAddress[] + $CommandUnderTest | Should -HaveParameter IPAddress -Type System.Net.IPAddress[] } It "Should have SubnetMask as a parameter" { - $CommandUnderTest | Should -HaveParameter SubnetMask -Type IPAddress + $CommandUnderTest | Should -HaveParameter SubnetMask -Type System.Net.IPAddress } It "Should have Port as a parameter" { - $CommandUnderTest | Should -HaveParameter Port -Type Int32 + $CommandUnderTest | Should -HaveParameter Port -Type System.Int32 } It "Should have Dhcp as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Dhcp -Type Switch + $CommandUnderTest | Should -HaveParameter Dhcp -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaAzAccessToken.Tests.ps1 b/tests/New-DbaAzAccessToken.Tests.ps1 index 083deedaea..7f8e2a3018 100644 --- a/tests/New-DbaAzAccessToken.Tests.ps1 +++ b/tests/New-DbaAzAccessToken.Tests.ps1 @@ -10,28 +10,28 @@ Describe "New-DbaAzAccessToken" { $CommandUnderTest = Get-Command New-DbaAzAccessToken } It "Should have Type as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false } It "Should have Subtype as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Subtype -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Subtype -Type System.String -Mandatory:$false } It "Should have Config as a non-mandatory Object parameter" { - $CommandUnderTest | Should -HaveParameter Config -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Config -Type System.Object -Mandatory:$false } It "Should have Credential as a non-mandatory PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Tenant as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Tenant -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Tenant -Type System.String -Mandatory:$false } It "Should have Thumbprint as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Thumbprint -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Thumbprint -Type System.String -Mandatory:$false } It "Should have Store as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Store -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Store -Type System.String -Mandatory:$false } It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/New-DbaClientAlias.Tests.ps1 b/tests/New-DbaClientAlias.Tests.ps1 index 5143251154..f88ae6a6a2 100644 --- a/tests/New-DbaClientAlias.Tests.ps1 +++ b/tests/New-DbaClientAlias.Tests.ps1 @@ -12,22 +12,22 @@ Describe "New-DbaClientAlias" { $CommandUnderTest = Get-Command New-DbaClientAlias } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have ServerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerName -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter ServerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have Alias as a parameter" { - $CommandUnderTest | Should -HaveParameter Alias -Type String + $CommandUnderTest | Should -HaveParameter Alias -Type System.String } It "Should have Protocol as a parameter" { - $CommandUnderTest | Should -HaveParameter Protocol -Type String + $CommandUnderTest | Should -HaveParameter Protocol -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaCmConnection.Tests.ps1 b/tests/New-DbaCmConnection.Tests.ps1 index c42b956594..98c2c7054c 100644 --- a/tests/New-DbaCmConnection.Tests.ps1 +++ b/tests/New-DbaCmConnection.Tests.ps1 @@ -6,43 +6,43 @@ Describe "New-DbaCmConnection" { $CommandUnderTest = Get-Command New-DbaCmConnection } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaCmConnectionParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaCmConnectionParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have UseWindowsCredentials as a switch parameter" { - $CommandUnderTest | Should -HaveParameter UseWindowsCredentials -Type switch + $CommandUnderTest | Should -HaveParameter UseWindowsCredentials -Type System.Management.Automation.SwitchParameter } It "Should have OverrideExplicitCredential as a switch parameter" { - $CommandUnderTest | Should -HaveParameter OverrideExplicitCredential -Type switch + $CommandUnderTest | Should -HaveParameter OverrideExplicitCredential -Type System.Management.Automation.SwitchParameter } It "Should have DisabledConnectionTypes as a parameter" { $CommandUnderTest | Should -HaveParameter DisabledConnectionTypes -Type Dataplat.Dbatools.Connection.ManagementConnectionType } It "Should have DisableBadCredentialCache as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DisableBadCredentialCache -Type switch + $CommandUnderTest | Should -HaveParameter DisableBadCredentialCache -Type System.Management.Automation.SwitchParameter } It "Should have DisableCimPersistence as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DisableCimPersistence -Type switch + $CommandUnderTest | Should -HaveParameter DisableCimPersistence -Type System.Management.Automation.SwitchParameter } It "Should have DisableCredentialAutoRegister as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DisableCredentialAutoRegister -Type switch + $CommandUnderTest | Should -HaveParameter DisableCredentialAutoRegister -Type System.Management.Automation.SwitchParameter } It "Should have EnableCredentialFailover as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableCredentialFailover -Type switch + $CommandUnderTest | Should -HaveParameter EnableCredentialFailover -Type System.Management.Automation.SwitchParameter } It "Should have WindowsCredentialsAreBad as a switch parameter" { - $CommandUnderTest | Should -HaveParameter WindowsCredentialsAreBad -Type switch + $CommandUnderTest | Should -HaveParameter WindowsCredentialsAreBad -Type System.Management.Automation.SwitchParameter } It "Should have CimWinRMOptions as a parameter" { - $CommandUnderTest | Should -HaveParameter CimWinRMOptions -Type WSManSessionOptions + $CommandUnderTest | Should -HaveParameter CimWinRMOptions -Type Microsoft.Management.Infrastructure.Options.WSManSessionOptions } It "Should have CimDCOMOptions as a parameter" { - $CommandUnderTest | Should -HaveParameter CimDCOMOptions -Type DComSessionOptions + $CommandUnderTest | Should -HaveParameter CimDCOMOptions -Type Microsoft.Management.Infrastructure.Options.DComSessionOptions } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/New-DbaComputerCertificate.Tests.ps1 b/tests/New-DbaComputerCertificate.Tests.ps1 index bf6495b9d3..aa424ce064 100644 --- a/tests/New-DbaComputerCertificate.Tests.ps1 +++ b/tests/New-DbaComputerCertificate.Tests.ps1 @@ -6,55 +6,55 @@ Describe "New-DbaComputerCertificate" { $CommandUnderTest = Get-Command New-DbaComputerCertificate } It "Should have ComputerName as a non-mandatory DbaInstanceParameter[] parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have Credential as a non-mandatory PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have CaServer as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter CaServer -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CaServer -Type System.String -Mandatory:$false } It "Should have CaName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter CaName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CaName -Type System.String -Mandatory:$false } It "Should have ClusterInstanceName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ClusterInstanceName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ClusterInstanceName -Type System.String -Mandatory:$false } It "Should have SecurePassword as a non-mandatory SecureString parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString -Mandatory:$false } It "Should have FriendlyName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter FriendlyName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FriendlyName -Type System.String -Mandatory:$false } It "Should have CertificateTemplate as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter CertificateTemplate -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CertificateTemplate -Type System.String -Mandatory:$false } It "Should have KeyLength as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter KeyLength -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter KeyLength -Type System.Int32 -Mandatory:$false } It "Should have Store as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Store -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Store -Type System.String -Mandatory:$false } It "Should have Folder as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Folder -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Folder -Type System.String -Mandatory:$false } It "Should have Flag as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Flag -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Flag -Type System.String[] -Mandatory:$false } It "Should have Dns as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Dns -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Dns -Type System.String[] -Mandatory:$false } It "Should have SelfSigned as a non-mandatory Switch parameter" { - $CommandUnderTest | Should -HaveParameter SelfSigned -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SelfSigned -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 } It "Should have HashAlgorithm as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter HashAlgorithm -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter HashAlgorithm -Type System.String -Mandatory:$false } It "Should have MonthsValid as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter MonthsValid -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MonthsValid -Type System.Int32 -Mandatory:$false } } } diff --git a/tests/New-DbaComputerCertificateSigningRequest.Tests.ps1 b/tests/New-DbaComputerCertificateSigningRequest.Tests.ps1 index 584a31e835..c56836513e 100644 --- a/tests/New-DbaComputerCertificateSigningRequest.Tests.ps1 +++ b/tests/New-DbaComputerCertificateSigningRequest.Tests.ps1 @@ -5,29 +5,29 @@ Describe "New-DbaComputerCertificateSigningRequest" { BeforeAll { $CommandUnderTest = Get-Command New-DbaComputerCertificateSigningRequest } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have ClusterInstanceName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ClusterInstanceName -Type String -Mandatory:$false + It "Should have ClusterInstanceName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ClusterInstanceName -Type System.String -Mandatory:$false } - It "Should have Path as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } - It "Should have FriendlyName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FriendlyName -Type String -Mandatory:$false + It "Should have FriendlyName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FriendlyName -Type System.String -Mandatory:$false } - It "Should have KeyLength as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter KeyLength -Type Int32 -Mandatory:$false + It "Should have KeyLength as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter KeyLength -Type System.Int32 -Mandatory:$false } - It "Should have Dns as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Dns -Type String[] -Mandatory:$false + It "Should have Dns as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Dns -Type System.String[] -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 } } diff --git a/tests/New-DbaConnectionString.Tests.ps1 b/tests/New-DbaConnectionString.Tests.ps1 index 012243e0cb..c75b415efd 100644 --- a/tests/New-DbaConnectionString.Tests.ps1 +++ b/tests/New-DbaConnectionString.Tests.ps1 @@ -5,83 +5,83 @@ Describe "New-DbaConnectionString" { BeforeAll { $CommandUnderTest = Get-Command New-DbaConnectionString } - 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 Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have AccessToken as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter AccessToken -Type String -Mandatory:$false + It "Should have AccessToken as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter AccessToken -Type System.String -Mandatory:$false } - It "Should have ApplicationIntent as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ApplicationIntent -Type String -Mandatory:$false + It "Should have ApplicationIntent as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ApplicationIntent -Type System.String -Mandatory:$false } - It "Should have BatchSeparator as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String -Mandatory:$false + It "Should have BatchSeparator as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String -Mandatory:$false } - It "Should have ClientName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ClientName -Type String -Mandatory:$false + It "Should have ClientName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ClientName -Type System.String -Mandatory:$false } - It "Should have ConnectTimeout as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter ConnectTimeout -Type Int32 -Mandatory:$false + It "Should have ConnectTimeout as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter ConnectTimeout -Type System.Int32 -Mandatory:$false } - It "Should have Database as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Database -Type String -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String -Mandatory:$false } It "Should have EncryptConnection as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter EncryptConnection -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EncryptConnection -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have FailoverPartner as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FailoverPartner -Type String -Mandatory:$false + It "Should have FailoverPartner as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FailoverPartner -Type System.String -Mandatory:$false } It "Should have IsActiveDirectoryUniversalAuth as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IsActiveDirectoryUniversalAuth -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IsActiveDirectoryUniversalAuth -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have LockTimeout as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter LockTimeout -Type Int32 -Mandatory:$false + It "Should have LockTimeout as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter LockTimeout -Type System.Int32 -Mandatory:$false } - It "Should have MaxPoolSize as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MaxPoolSize -Type Int32 -Mandatory:$false + It "Should have MaxPoolSize as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MaxPoolSize -Type System.Int32 -Mandatory:$false } - It "Should have MinPoolSize as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MinPoolSize -Type Int32 -Mandatory:$false + It "Should have MinPoolSize as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MinPoolSize -Type System.Int32 -Mandatory:$false } It "Should have MultipleActiveResultSets as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter MultipleActiveResultSets -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MultipleActiveResultSets -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have MultiSubnetFailover as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter MultiSubnetFailover -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MultiSubnetFailover -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have NetworkProtocol as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter NetworkProtocol -Type String -Mandatory:$false + It "Should have NetworkProtocol as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter NetworkProtocol -Type System.String -Mandatory:$false } It "Should have NonPooledConnection as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NonPooledConnection -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NonPooledConnection -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have PacketSize as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter PacketSize -Type Int32 -Mandatory:$false + It "Should have PacketSize as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter PacketSize -Type System.Int32 -Mandatory:$false } - It "Should have PooledConnectionLifetime as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter PooledConnectionLifetime -Type Int32 -Mandatory:$false + It "Should have PooledConnectionLifetime as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter PooledConnectionLifetime -Type System.Int32 -Mandatory:$false } - It "Should have SqlExecutionModes as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter SqlExecutionModes -Type String -Mandatory:$false + It "Should have SqlExecutionModes as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter SqlExecutionModes -Type System.String -Mandatory:$false } - It "Should have StatementTimeout as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter StatementTimeout -Type Int32 -Mandatory:$false + It "Should have StatementTimeout as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter StatementTimeout -Type System.Int32 -Mandatory:$false } It "Should have TrustServerCertificate as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter TrustServerCertificate -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter TrustServerCertificate -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have WorkstationId as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter WorkstationId -Type String -Mandatory:$false + It "Should have WorkstationId as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter WorkstationId -Type System.String -Mandatory:$false } It "Should have Legacy as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Legacy -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Legacy -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have AppendConnectionString as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter AppendConnectionString -Type String -Mandatory:$false + It "Should have AppendConnectionString as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter AppendConnectionString -Type System.String -Mandatory:$false } } diff --git a/tests/New-DbaConnectionStringBuilder.Tests.ps1 b/tests/New-DbaConnectionStringBuilder.Tests.ps1 index 63205fad57..798ec6daba 100644 --- a/tests/New-DbaConnectionStringBuilder.Tests.ps1 +++ b/tests/New-DbaConnectionStringBuilder.Tests.ps1 @@ -6,43 +6,43 @@ Describe "New-DbaConnectionStringBuilder" { $CommandUnderTest = Get-Command New-DbaConnectionStringBuilder } It "Should have ConnectionString as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionString -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ConnectionString -Type System.String[] -Mandatory:$false } It "Should have ApplicationName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ApplicationName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ApplicationName -Type System.String -Mandatory:$false } It "Should have DataSource as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter DataSource -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DataSource -Type System.String -Mandatory:$false } It "Should have SqlCredential as a non-mandatory PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have InitialCatalog as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter InitialCatalog -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InitialCatalog -Type System.String -Mandatory:$false } It "Should have IntegratedSecurity as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter IntegratedSecurity -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IntegratedSecurity -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have UserName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter UserName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter UserName -Type System.String -Mandatory:$false } It "Should have Password as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Password -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Password -Type System.String -Mandatory:$false } It "Should have MultipleActiveResultSets as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter MultipleActiveResultSets -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MultipleActiveResultSets -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have ColumnEncryptionSetting as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ColumnEncryptionSetting -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ColumnEncryptionSetting -Type System.String -Mandatory:$false } It "Should have Legacy as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Legacy -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Legacy -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have NonPooledConnection as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter NonPooledConnection -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NonPooledConnection -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have WorkstationId as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter WorkstationId -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WorkstationId -Type System.String -Mandatory:$false } } diff --git a/tests/New-DbaCredential.Tests.ps1 b/tests/New-DbaCredential.Tests.ps1 index d51af1d47f..1d75185dd8 100644 --- a/tests/New-DbaCredential.Tests.ps1 +++ b/tests/New-DbaCredential.Tests.ps1 @@ -20,25 +20,25 @@ Describe 'New-DbaCredential' -Tag 'UnitTests', 'IntegrationTests' { $CommandUnderTest | Should -HaveParameter -Name 'SqlCredential' -Type 'PSCredential' -Mandatory:$false } It "Accepts Name as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'Name' -Type 'String' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'Name' -Type 'System.String' -Mandatory:$false } It "Accepts Identity as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'Identity' -Type 'String' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'Identity' -Type 'System.String' -Mandatory:$false } It "Accepts SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'SecurePassword' -Type 'SecureString' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'SecurePassword' -Type 'System.Security.SecureString' -Mandatory:$false } It "Accepts MappedClassType as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'MappedClassType' -Type 'String' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'MappedClassType' -Type 'System.String' -Mandatory:$false } It "Accepts ProviderName as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'ProviderName' -Type 'String' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'ProviderName' -Type 'System.String' -Mandatory:$false } It "Accepts Force as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'Force' -Type 'Switch' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'Force' -Type 'System.Management.Automation.SwitchParameter' -Mandatory:$false } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter -Name 'EnableException' -Type 'Switch' -Mandatory:$false + $CommandUnderTest | Should -HaveParameter -Name 'EnableException' -Type 'System.Management.Automation.SwitchParameter' -Mandatory:$false } } diff --git a/tests/New-DbaCustomError.Tests.ps1 b/tests/New-DbaCustomError.Tests.ps1 index d8f6c322a4..bf10cc44f1 100644 --- a/tests/New-DbaCustomError.Tests.ps1 +++ b/tests/New-DbaCustomError.Tests.ps1 @@ -15,23 +15,23 @@ Describe "New-DbaCustomError" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } - It "Should have MessageID as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MessageID -Type Int32 -Mandatory:$false + It "Should have MessageID as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MessageID -Type System.Int32 -Mandatory:$false } - It "Should have Severity as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Severity -Type Int32 -Mandatory:$false + It "Should have Severity as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Severity -Type System.Int32 -Mandatory:$false } - It "Should have MessageText as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter MessageText -Type String -Mandatory:$false + It "Should have MessageText as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter MessageText -Type System.String -Mandatory:$false } - It "Should have Language as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Language -Type String -Mandatory:$false + It "Should have Language as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Language -Type System.String -Mandatory:$false } It "Should have WithLog as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter WithLog -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WithLog -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 } } diff --git a/tests/New-DbaDacOption.Tests.ps1 b/tests/New-DbaDacOption.Tests.ps1 index 955376e32e..8593440ad4 100644 --- a/tests/New-DbaDacOption.Tests.ps1 +++ b/tests/New-DbaDacOption.Tests.ps1 @@ -5,20 +5,20 @@ Describe "New-DbaDacOption" { BeforeAll { $CommandUnderTest = Get-Command New-DbaDacOption } - It "Should have Type as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String -Mandatory:$false + It "Should have Type as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false } - It "Should have Action as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Action -Type String -Mandatory:$false + It "Should have Action as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Action -Type System.String -Mandatory:$false } - It "Should have PublishXml as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter PublishXml -Type String -Mandatory:$false + It "Should have PublishXml as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter PublishXml -Type System.String -Mandatory:$false } - It "Should have Property as a non-mandatory Hashtable parameter" { - $CommandUnderTest | Should -HaveParameter Property -Type Hashtable -Mandatory:$false + It "Should have Property as a non-mandatory System.Collections.Hashtable parameter" { + $CommandUnderTest | Should -HaveParameter Property -Type System.Collections.Hashtable -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaDacProfile.Tests.ps1 b/tests/New-DbaDacProfile.Tests.ps1 index d9bc80a791..cb933c41b1 100644 --- a/tests/New-DbaDacProfile.Tests.ps1 +++ b/tests/New-DbaDacProfile.Tests.ps1 @@ -12,19 +12,19 @@ Describe "New-DbaDacProfile" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have ConnectionString as a parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionString -Type String[] + $CommandUnderTest | Should -HaveParameter ConnectionString -Type System.String[] } It "Should have PublishOptions as a parameter" { $CommandUnderTest | Should -HaveParameter PublishOptions -Type Hashtable } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDatabase.Tests.ps1 b/tests/New-DbaDatabase.Tests.ps1 index 9078b1d879..74483ae338 100644 --- a/tests/New-DbaDatabase.Tests.ps1 +++ b/tests/New-DbaDatabase.Tests.ps1 @@ -38,70 +38,70 @@ Describe "New-DbaDatabase" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type 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 Name parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] -Mandatory:$false } It "Should have Collation parameter" { - $CommandUnderTest | Should -HaveParameter Collation -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Collation -Type System.String -Mandatory:$false } It "Should have RecoveryModel parameter" { - $CommandUnderTest | Should -HaveParameter RecoveryModel -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RecoveryModel -Type System.String -Mandatory:$false } It "Should have Owner parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Owner -Type System.String -Mandatory:$false } It "Should have DataFilePath parameter" { - $CommandUnderTest | Should -HaveParameter DataFilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DataFilePath -Type System.String -Mandatory:$false } It "Should have LogFilePath parameter" { - $CommandUnderTest | Should -HaveParameter LogFilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogFilePath -Type System.String -Mandatory:$false } It "Should have PrimaryFilesize parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryFilesize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PrimaryFilesize -Type System.Int32 -Mandatory:$false } It "Should have PrimaryFileGrowth parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryFileGrowth -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PrimaryFileGrowth -Type System.Int32 -Mandatory:$false } It "Should have PrimaryFileMaxSize parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryFileMaxSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PrimaryFileMaxSize -Type System.Int32 -Mandatory:$false } It "Should have LogSize parameter" { - $CommandUnderTest | Should -HaveParameter LogSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogSize -Type System.Int32 -Mandatory:$false } It "Should have LogGrowth parameter" { - $CommandUnderTest | Should -HaveParameter LogGrowth -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogGrowth -Type System.Int32 -Mandatory:$false } It "Should have LogMaxSize parameter" { - $CommandUnderTest | Should -HaveParameter LogMaxSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogMaxSize -Type System.Int32 -Mandatory:$false } It "Should have SecondaryFilesize parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryFilesize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecondaryFilesize -Type System.Int32 -Mandatory:$false } It "Should have SecondaryFileGrowth parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryFileGrowth -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecondaryFileGrowth -Type System.Int32 -Mandatory:$false } It "Should have SecondaryFileMaxSize parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryFileMaxSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecondaryFileMaxSize -Type System.Int32 -Mandatory:$false } It "Should have SecondaryFileCount parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryFileCount -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecondaryFileCount -Type System.Int32 -Mandatory:$false } It "Should have DefaultFileGroup parameter" { - $CommandUnderTest | Should -HaveParameter DefaultFileGroup -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DefaultFileGroup -Type System.String -Mandatory:$false } It "Should have DataFileSuffix parameter" { - $CommandUnderTest | Should -HaveParameter DataFileSuffix -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DataFileSuffix -Type System.String -Mandatory:$false } It "Should have LogFileSuffix parameter" { - $CommandUnderTest | Should -HaveParameter LogFileSuffix -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogFileSuffix -Type System.String -Mandatory:$false } It "Should have SecondaryDataFileSuffix parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryDataFileSuffix -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecondaryDataFileSuffix -Type System.String -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaDbAsymmetricKey.Tests.ps1 b/tests/New-DbaDbAsymmetricKey.Tests.ps1 index 288ab5761d..a1747ef72d 100644 --- a/tests/New-DbaDbAsymmetricKey.Tests.ps1 +++ b/tests/New-DbaDbAsymmetricKey.Tests.ps1 @@ -16,31 +16,31 @@ Describe "New-DbaDbAsymmetricKey" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have Owner as a parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String + $CommandUnderTest | Should -HaveParameter Owner -Type System.String } It "Should have KeySource as a parameter" { - $CommandUnderTest | Should -HaveParameter KeySource -Type String + $CommandUnderTest | Should -HaveParameter KeySource -Type System.String } It "Should have KeySourceType as a parameter" { - $CommandUnderTest | Should -HaveParameter KeySourceType -Type String + $CommandUnderTest | Should -HaveParameter KeySourceType -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have Algorithm as a parameter" { - $CommandUnderTest | Should -HaveParameter Algorithm -Type String + $CommandUnderTest | Should -HaveParameter Algorithm -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDbCertificate.Tests.ps1 b/tests/New-DbaDbCertificate.Tests.ps1 index c40cd312e2..cc4a895236 100644 --- a/tests/New-DbaDbCertificate.Tests.ps1 +++ b/tests/New-DbaDbCertificate.Tests.ps1 @@ -18,31 +18,31 @@ Describe "New-DbaDbCertificate" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Subject as a parameter" { - $CommandUnderTest | Should -HaveParameter Subject -Type String[] + $CommandUnderTest | Should -HaveParameter Subject -Type System.String[] } It "Should have StartDate as a parameter" { - $CommandUnderTest | Should -HaveParameter StartDate -Type DateTime + $CommandUnderTest | Should -HaveParameter StartDate -Type System.DateTime } It "Should have ExpirationDate as a parameter" { - $CommandUnderTest | Should -HaveParameter ExpirationDate -Type DateTime + $CommandUnderTest | Should -HaveParameter ExpirationDate -Type System.DateTime } It "Should have ActiveForServiceBrokerDialog as a parameter" { - $CommandUnderTest | Should -HaveParameter ActiveForServiceBrokerDialog -Type Switch + $CommandUnderTest | Should -HaveParameter ActiveForServiceBrokerDialog -Type System.Management.Automation.SwitchParameter } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDbDataGeneratorConfig.Tests.ps1 b/tests/New-DbaDbDataGeneratorConfig.Tests.ps1 index 89bbcf2bdc..76d71ed03e 100644 --- a/tests/New-DbaDbDataGeneratorConfig.Tests.ps1 +++ b/tests/New-DbaDbDataGeneratorConfig.Tests.ps1 @@ -31,29 +31,29 @@ Describe "New-DbaDbDataGeneratorConfig" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } - It "Should have Database as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } - It "Should have Table as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + It "Should have Table as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] -Mandatory:$false } It "Should have ResetIdentity as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ResetIdentity -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResetIdentity -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have TruncateTable as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter TruncateTable -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter TruncateTable -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have Rows as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Rows -Type Int32 -Mandatory:$false + It "Should have Rows as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Rows -Type System.Int32 -Mandatory:$false } - It "Should have Path as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Path -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 } } diff --git a/tests/New-DbaDbEncryptionKey.Tests.ps1 b/tests/New-DbaDbEncryptionKey.Tests.ps1 index a85d535a79..5b159b213a 100644 --- a/tests/New-DbaDbEncryptionKey.Tests.ps1 +++ b/tests/New-DbaDbEncryptionKey.Tests.ps1 @@ -12,25 +12,25 @@ Describe "New-DbaDbEncryptionKey Unit Tests" -Tag "UnitTests" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have EncryptorName parameter" { - $CommandUnderTest | Should -HaveParameter EncryptorName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EncryptorName -Type System.String -Mandatory:$false } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false } It "Should have EncryptionAlgorithm parameter" { - $CommandUnderTest | Should -HaveParameter EncryptionAlgorithm -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EncryptionAlgorithm -Type System.String -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have Force parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/New-DbaDbFileGroup.Tests.ps1 b/tests/New-DbaDbFileGroup.Tests.ps1 index 06ef8a021d..6804813db6 100644 --- a/tests/New-DbaDbFileGroup.Tests.ps1 +++ b/tests/New-DbaDbFileGroup.Tests.ps1 @@ -37,25 +37,25 @@ Describe "New-DbaDbFileGroup" { $CommandUnderTest = Get-Command New-DbaDbFileGroup } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.Credential -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have FileGroup parameter" { - $CommandUnderTest | Should -HaveParameter FileGroup -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileGroup -Type System.String -Mandatory:$false } It "Should have FileGroupType parameter" { - $CommandUnderTest | Should -HaveParameter FileGroupType -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileGroupType -Type System.String -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaDbMailAccount.Tests.ps1 b/tests/New-DbaDbMailAccount.Tests.ps1 index aa2abef320..c2c6274085 100644 --- a/tests/New-DbaDbMailAccount.Tests.ps1 +++ b/tests/New-DbaDbMailAccount.Tests.ps1 @@ -5,35 +5,35 @@ Describe "New-DbaDbMailAccount" { BeforeAll { $CommandUnderTest = Get-Command New-DbaDbMailAccount } - 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 Microsoft.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.Management.Automation.PSCredential -Mandatory:$false } - It "Should have Account as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Account -Type String -Mandatory:$false + It "Should have Account as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Account -Type System.String -Mandatory:$false } - It "Should have DisplayName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter DisplayName -Type String -Mandatory:$false + It "Should have DisplayName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter DisplayName -Type System.String -Mandatory:$false } - It "Should have Description as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Description -Type String -Mandatory:$false + It "Should have Description as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Description -Type System.String -Mandatory:$false } - It "Should have EmailAddress as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter EmailAddress -Type String -Mandatory:$false + It "Should have EmailAddress as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter EmailAddress -Type System.String -Mandatory:$false } - It "Should have ReplyToAddress as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ReplyToAddress -Type String -Mandatory:$false + It "Should have ReplyToAddress as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ReplyToAddress -Type System.String -Mandatory:$false } - It "Should have MailServer as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter MailServer -Type String -Mandatory:$false + It "Should have MailServer as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter MailServer -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.Switch -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.Switch -Mandatory:$false } } diff --git a/tests/New-DbaDbMailProfile.Tests.ps1 b/tests/New-DbaDbMailProfile.Tests.ps1 index 5d327e55af..8aea808b3b 100644 --- a/tests/New-DbaDbMailProfile.Tests.ps1 +++ b/tests/New-DbaDbMailProfile.Tests.ps1 @@ -12,19 +12,19 @@ Describe "New-DbaDbMailProfile" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Profile as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Profile -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Profile -Type System.String -Mandatory:$false } It "Should have Description as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Description -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Description -Type System.String -Mandatory:$false } It "Should have MailAccountName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter MailAccountName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MailAccountName -Type System.String -Mandatory:$false } It "Should have MailAccountPriority as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MailAccountPriority -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MailAccountPriority -Type System.Int32 -Mandatory:$false } It "Should have EnableException as a non-mandatory parameter of type Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaDbMaskingConfig.Tests.ps1 b/tests/New-DbaDbMaskingConfig.Tests.ps1 index 2ab9f94135..719e806a93 100644 --- a/tests/New-DbaDbMaskingConfig.Tests.ps1 +++ b/tests/New-DbaDbMaskingConfig.Tests.ps1 @@ -11,47 +11,47 @@ Describe "New-DbaDbMaskingConfig" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } - It "Should have Database as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } - It "Should have Table as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + It "Should have Table as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] -Mandatory:$false } - It "Should have Column as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Column -Type String[] -Mandatory:$false + It "Should have Column as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Column -Type System.String[] -Mandatory:$false } - It "Should have Path as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } - It "Should have Locale as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Locale -Type String -Mandatory:$false + It "Should have Locale as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Locale -Type System.String -Mandatory:$false } - It "Should have CharacterString as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter CharacterString -Type String -Mandatory:$false + It "Should have CharacterString as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter CharacterString -Type System.String -Mandatory:$false } - It "Should have SampleCount as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter SampleCount -Type Int32 -Mandatory:$false + It "Should have SampleCount as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter SampleCount -Type System.Int32 -Mandatory:$false } - It "Should have KnownNameFilePath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter KnownNameFilePath -Type String -Mandatory:$false + It "Should have KnownNameFilePath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter KnownNameFilePath -Type System.String -Mandatory:$false } - It "Should have PatternFilePath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter PatternFilePath -Type String -Mandatory:$false + It "Should have PatternFilePath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter PatternFilePath -Type System.String -Mandatory:$false } It "Should have ExcludeDefaultKnownName as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDefaultKnownName -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDefaultKnownName -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExcludeDefaultPattern as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDefaultPattern -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDefaultPattern -Type System.Management.Automation.SwitchParameter -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 InputObject as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -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 } } diff --git a/tests/New-DbaDbMasterKey.Tests.ps1 b/tests/New-DbaDbMasterKey.Tests.ps1 index cf121a8d81..6b85ce5cd9 100644 --- a/tests/New-DbaDbMasterKey.Tests.ps1 +++ b/tests/New-DbaDbMasterKey.Tests.ps1 @@ -9,22 +9,22 @@ Describe "New-DbaDbMasterKey" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDbRole.Tests.ps1 b/tests/New-DbaDbRole.Tests.ps1 index 3e3d3789e3..44f26bf7fb 100644 --- a/tests/New-DbaDbRole.Tests.ps1 +++ b/tests/New-DbaDbRole.Tests.ps1 @@ -29,22 +29,22 @@ Describe "New-DbaDbRole" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have Role as a parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type String[] + $CommandUnderTest | Should -HaveParameter Role -Type System.String[] } It "Should have Owner as a parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String + $CommandUnderTest | Should -HaveParameter Owner -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/New-DbaDbSchema.Tests.ps1 b/tests/New-DbaDbSchema.Tests.ps1 index e28513f82d..8132c040be 100644 --- a/tests/New-DbaDbSchema.Tests.ps1 +++ b/tests/New-DbaDbSchema.Tests.ps1 @@ -6,25 +6,25 @@ Describe "New-DbaDbSchema" { $CommandUnderTest = Get-Command New-DbaDbSchema } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Schema parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String[] + $CommandUnderTest | Should -HaveParameter Schema -Type System.String[] } It "Should have SchemaOwner parameter" { - $CommandUnderTest | Should -HaveParameter SchemaOwner -Type String + $CommandUnderTest | Should -HaveParameter SchemaOwner -Type System.String } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } } diff --git a/tests/New-DbaDbSequence.Tests.ps1 b/tests/New-DbaDbSequence.Tests.ps1 index 0cb5407b36..4560fb68a6 100644 --- a/tests/New-DbaDbSequence.Tests.ps1 +++ b/tests/New-DbaDbSequence.Tests.ps1 @@ -31,34 +31,34 @@ Describe "New-DbaDbSequence" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Sequence parameter" { - $CommandUnderTest | Should -HaveParameter Sequence -Type String[] + $CommandUnderTest | Should -HaveParameter Sequence -Type System.String[] } It "Should have Schema parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have IntegerType parameter" { - $CommandUnderTest | Should -HaveParameter IntegerType -Type String + $CommandUnderTest | Should -HaveParameter IntegerType -Type System.String } It "Should have StartWith parameter" { - $CommandUnderTest | Should -HaveParameter StartWith -Type Int64 + $CommandUnderTest | Should -HaveParameter StartWith -Type System.Int64 } It "Should have IncrementBy parameter" { - $CommandUnderTest | Should -HaveParameter IncrementBy -Type Int64 + $CommandUnderTest | Should -HaveParameter IncrementBy -Type System.Int64 } It "Should have MinValue parameter" { - $CommandUnderTest | Should -HaveParameter MinValue -Type Int64 + $CommandUnderTest | Should -HaveParameter MinValue -Type System.Int64 } It "Should have MaxValue parameter" { - $CommandUnderTest | Should -HaveParameter MaxValue -Type Int64 + $CommandUnderTest | Should -HaveParameter MaxValue -Type System.Int64 } It "Should have Cycle parameter" { $CommandUnderTest | Should -HaveParameter Cycle -Type Switch } It "Should have CacheSize parameter" { - $CommandUnderTest | Should -HaveParameter CacheSize -Type Int32 + $CommandUnderTest | Should -HaveParameter CacheSize -Type System.Int32 } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] diff --git a/tests/New-DbaDbSnapshot.Tests.ps1 b/tests/New-DbaDbSnapshot.Tests.ps1 index 46571fef5e..350cb9ab5e 100644 --- a/tests/New-DbaDbSnapshot.Tests.ps1 +++ b/tests/New-DbaDbSnapshot.Tests.ps1 @@ -11,37 +11,37 @@ Describe "New-DbaDbSnapshot" { $CommandUnderTest = Get-Command New-DbaDbSnapshot } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have AllDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter AllDatabases -Type System.Management.Automation.SwitchParameter } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have NameSuffix as a parameter" { - $CommandUnderTest | Should -HaveParameter NameSuffix -Type String + $CommandUnderTest | Should -HaveParameter NameSuffix -Type System.String } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDbSynonym.Tests.ps1 b/tests/New-DbaDbSynonym.Tests.ps1 index 87a4f8f373..8d612fb719 100644 --- a/tests/New-DbaDbSynonym.Tests.ps1 +++ b/tests/New-DbaDbSynonym.Tests.ps1 @@ -28,34 +28,34 @@ Describe "New-DbaDbSynonym" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have Synonym as a parameter" { - $CommandUnderTest | Should -HaveParameter Synonym -Type String + $CommandUnderTest | Should -HaveParameter Synonym -Type System.String } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have BaseServer as a parameter" { - $CommandUnderTest | Should -HaveParameter BaseServer -Type String + $CommandUnderTest | Should -HaveParameter BaseServer -Type System.String } It "Should have BaseDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter BaseDatabase -Type String + $CommandUnderTest | Should -HaveParameter BaseDatabase -Type System.String } It "Should have BaseSchema as a parameter" { - $CommandUnderTest | Should -HaveParameter BaseSchema -Type String + $CommandUnderTest | Should -HaveParameter BaseSchema -Type System.String } It "Should have BaseObject as a parameter" { - $CommandUnderTest | Should -HaveParameter BaseObject -Type String + $CommandUnderTest | Should -HaveParameter BaseObject -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDbTable.Tests.ps1 b/tests/New-DbaDbTable.Tests.ps1 index 89683c100b..b36bf9cbc9 100644 --- a/tests/New-DbaDbTable.Tests.ps1 +++ b/tests/New-DbaDbTable.Tests.ps1 @@ -25,25 +25,25 @@ Describe "New-DbaDbTable" { $CommandUnderTest = Get-Command New-DbaDbTable } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have ColumnMap as a parameter" { - $CommandUnderTest | Should -HaveParameter ColumnMap -Type Hash[Microsoft.SqlServer.Management.Smo.Table[]] + $CommandUnderTest | Should -HaveParameter ColumnMap -Type System.Collections.Hashtable[Microsoft.SqlServer.Management.Smo.Table[]] } It "Should have ColumnObject as a parameter" { - $CommandUnderTest | Should -HaveParameter ColumnObject -Type Column[] + $CommandUnderTest | Should -HaveParameter ColumnObject -Type Microsoft.SqlServer.Management.Smo.Column[] } # Add more parameter checks as needed } diff --git a/tests/New-DbaDbTransfer.Tests.ps1 b/tests/New-DbaDbTransfer.Tests.ps1 index 335699e8bf..98c50430f7 100644 --- a/tests/New-DbaDbTransfer.Tests.ps1 +++ b/tests/New-DbaDbTransfer.Tests.ps1 @@ -86,37 +86,37 @@ Describe "New-DbaDbTransfer" { $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have DestinationDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type String + $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type System.String } It "Should have BatchSize as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 } It "Should have BulkCopyTimeOut as a parameter" { - $CommandUnderTest | Should -HaveParameter BulkCopyTimeOut -Type Int32 + $CommandUnderTest | Should -HaveParameter BulkCopyTimeOut -Type System.Int32 } It "Should have ScriptingOption as a parameter" { - $CommandUnderTest | Should -HaveParameter ScriptingOption -Type ScriptingOptions + $CommandUnderTest | Should -HaveParameter ScriptingOption -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type NamedSmoObject[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.NamedSmoObject[] } It "Should have CopyAllObjects as a switch parameter" { - $CommandUnderTest | Should -HaveParameter CopyAllObjects -Type Switch + $CommandUnderTest | Should -HaveParameter CopyAllObjects -Type System.Management.Automation.SwitchParameter } It "Should have CopyAll as a parameter" { $CommandUnderTest | Should -HaveParameter CopyAll -Type String[] } It "Should have SchemaOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter SchemaOnly -Type Switch + $CommandUnderTest | Should -HaveParameter SchemaOnly -Type System.Management.Automation.SwitchParameter } It "Should have DataOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DataOnly -Type Switch + $CommandUnderTest | Should -HaveParameter DataOnly -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDbUser.Tests.ps1 b/tests/New-DbaDbUser.Tests.ps1 index 67742ad3c1..b8d0ec2e14 100644 --- a/tests/New-DbaDbUser.Tests.ps1 +++ b/tests/New-DbaDbUser.Tests.ps1 @@ -37,34 +37,34 @@ Describe "New-DbaDbUser" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have IncludeSystem as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystem -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystem -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have User as a parameter" { - $CommandUnderTest | Should -HaveParameter User -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter User -Type System.String -Mandatory:$false } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Login -Type System.String -Mandatory:$false } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString -Mandatory:$false } It "Should have ExternalProvider as a parameter" { - $CommandUnderTest | Should -HaveParameter ExternalProvider -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExternalProvider -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DefaultSchema as a parameter" { - $CommandUnderTest | Should -HaveParameter DefaultSchema -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DefaultSchema -Type System.String -Mandatory:$false } It "Should have Force as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaDiagnosticAdsNotebook.Tests.ps1 b/tests/New-DbaDiagnosticAdsNotebook.Tests.ps1 index f748923437..7ba85c19c4 100644 --- a/tests/New-DbaDiagnosticAdsNotebook.Tests.ps1 +++ b/tests/New-DbaDiagnosticAdsNotebook.Tests.ps1 @@ -12,16 +12,16 @@ Describe "New-DbaDiagnosticAdsNotebook" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have TargetVersion as a parameter" { - $CommandUnderTest | Should -HaveParameter TargetVersion -Type String + $CommandUnderTest | Should -HaveParameter TargetVersion -Type System.String } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have IncludeDatabaseSpecific as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeDatabaseSpecific -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeDatabaseSpecific -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaDirectory.Tests.ps1 b/tests/New-DbaDirectory.Tests.ps1 index 129969e085..19f3a2113f 100644 --- a/tests/New-DbaDirectory.Tests.ps1 +++ b/tests/New-DbaDirectory.Tests.ps1 @@ -9,23 +9,23 @@ Describe "New-DbaDirectory" { BeforeAll { $CommandUnderTest = Get-Command New-DbaDirectory } - 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 Path as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -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 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 } It "Should have WhatIf as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaEndpoint.Tests.ps1 b/tests/New-DbaEndpoint.Tests.ps1 index 07168a9cfc..26f77b4dfc 100644 --- a/tests/New-DbaEndpoint.Tests.ps1 +++ b/tests/New-DbaEndpoint.Tests.ps1 @@ -18,43 +18,43 @@ Describe "New-DbaEndpoint" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String + $CommandUnderTest | Should -HaveParameter Type -Type System.String } It "Should have Protocol as a parameter" { - $CommandUnderTest | Should -HaveParameter Protocol -Type String + $CommandUnderTest | Should -HaveParameter Protocol -Type System.String } It "Should have Role as a parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type String + $CommandUnderTest | Should -HaveParameter Role -Type System.String } It "Should have EndpointEncryption as a parameter" { - $CommandUnderTest | Should -HaveParameter EndpointEncryption -Type String + $CommandUnderTest | Should -HaveParameter EndpointEncryption -Type System.String } It "Should have EncryptionAlgorithm as a parameter" { - $CommandUnderTest | Should -HaveParameter EncryptionAlgorithm -Type String + $CommandUnderTest | Should -HaveParameter EncryptionAlgorithm -Type System.String } It "Should have AuthenticationOrder as a parameter" { - $CommandUnderTest | Should -HaveParameter AuthenticationOrder -Type String + $CommandUnderTest | Should -HaveParameter AuthenticationOrder -Type System.String } It "Should have Certificate as a parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type String + $CommandUnderTest | Should -HaveParameter Certificate -Type System.String } It "Should have IPAddress as a parameter" { - $CommandUnderTest | Should -HaveParameter IPAddress -Type IPAddress + $CommandUnderTest | Should -HaveParameter IPAddress -Type System.Net.IPAddress } It "Should have Port as a parameter" { - $CommandUnderTest | Should -HaveParameter Port -Type Int32 + $CommandUnderTest | Should -HaveParameter Port -Type System.Int32 } It "Should have SslPort as a parameter" { - $CommandUnderTest | Should -HaveParameter SslPort -Type Int32 + $CommandUnderTest | Should -HaveParameter SslPort -Type System.Int32 } It "Should have Owner as a parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String + $CommandUnderTest | Should -HaveParameter Owner -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaFirewallRule.Tests.ps1 b/tests/New-DbaFirewallRule.Tests.ps1 index 5f76c78866..98ede97106 100644 --- a/tests/New-DbaFirewallRule.Tests.ps1 +++ b/tests/New-DbaFirewallRule.Tests.ps1 @@ -12,16 +12,16 @@ Describe "New-DbaFirewallRule" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] -Mandatory:$false } It "Should have Configuration parameter" { - $CommandUnderTest | Should -HaveParameter Configuration -Type Hashtable -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Configuration -Type System.Collections.Hashtable -Mandatory:$false } It "Should have Force parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaLinkedServer.Tests.ps1 b/tests/New-DbaLinkedServer.Tests.ps1 index 0aa5973806..c0e6bff927 100644 --- a/tests/New-DbaLinkedServer.Tests.ps1 +++ b/tests/New-DbaLinkedServer.Tests.ps1 @@ -37,40 +37,40 @@ Describe "New-DbaLinkedServer" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have LinkedServer as a parameter" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type String + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.String } It "Should have ServerProduct as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerProduct -Type String + $CommandUnderTest | Should -HaveParameter ServerProduct -Type System.String } It "Should have Provider as a parameter" { - $CommandUnderTest | Should -HaveParameter Provider -Type String + $CommandUnderTest | Should -HaveParameter Provider -Type System.String } It "Should have DataSource as a parameter" { - $CommandUnderTest | Should -HaveParameter DataSource -Type String + $CommandUnderTest | Should -HaveParameter DataSource -Type System.String } It "Should have Location as a parameter" { - $CommandUnderTest | Should -HaveParameter Location -Type String + $CommandUnderTest | Should -HaveParameter Location -Type System.String } It "Should have ProviderString as a parameter" { - $CommandUnderTest | Should -HaveParameter ProviderString -Type String + $CommandUnderTest | Should -HaveParameter ProviderString -Type System.String } It "Should have Catalog as a parameter" { - $CommandUnderTest | Should -HaveParameter Catalog -Type String + $CommandUnderTest | Should -HaveParameter Catalog -Type System.String } It "Should have SecurityContext as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurityContext -Type String + $CommandUnderTest | Should -HaveParameter SecurityContext -Type System.String } It "Should have SecurityContextRemoteUser as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurityContextRemoteUser -Type String + $CommandUnderTest | Should -HaveParameter SecurityContextRemoteUser -Type System.String } It "Should have SecurityContextRemoteUserPassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurityContextRemoteUserPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurityContextRemoteUserPassword -Type System.Security.SecureString } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Server[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Server[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaLinkedServerLogin.Tests.ps1 b/tests/New-DbaLinkedServerLogin.Tests.ps1 index cbd8926c72..bd6a6f991f 100644 --- a/tests/New-DbaLinkedServerLogin.Tests.ps1 +++ b/tests/New-DbaLinkedServerLogin.Tests.ps1 @@ -6,31 +6,31 @@ Describe "New-DbaLinkedServerLogin" { $CommandUnderTest = Get-Command New-DbaLinkedServerLogin } 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 LinkedServer parameter" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.String[] -Mandatory:$false } It "Should have LocalLogin parameter" { - $CommandUnderTest | Should -HaveParameter LocalLogin -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LocalLogin -Type System.String -Mandatory:$false } It "Should have RemoteUser parameter" { - $CommandUnderTest | Should -HaveParameter RemoteUser -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RemoteUser -Type System.String -Mandatory:$false } It "Should have RemoteUserPassword parameter" { - $CommandUnderTest | Should -HaveParameter RemoteUserPassword -Type SecureString -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RemoteUserPassword -Type System.Security.SecureString -Mandatory:$false } It "Should have Impersonate parameter" { - $CommandUnderTest | Should -HaveParameter Impersonate -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Impersonate -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.LinkedServer[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/New-DbaLogin.Tests.ps1 b/tests/New-DbaLogin.Tests.ps1 index cacace44ae..2e6525a507 100644 --- a/tests/New-DbaLogin.Tests.ps1 +++ b/tests/New-DbaLogin.Tests.ps1 @@ -70,70 +70,70 @@ Describe "New-DbaLogin" { $Command = Get-Command -Name $CommandName } It "Should have SqlInstance parameter" { - $Command | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $Command | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential parameter" { - $Command | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $Command | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Login parameter" { - $Command | Should -HaveParameter Login -Type String[] -Mandatory:$false + $Command | Should -HaveParameter Login -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { - $Command | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $Command | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have LoginRenameHashtable parameter" { - $Command | Should -HaveParameter LoginRenameHashtable -Type Hashtable -Mandatory:$false + $Command | Should -HaveParameter LoginRenameHashtable -Type System.Collections.Hashtable -Mandatory:$false } It "Should have SecurePassword parameter" { - $Command | Should -HaveParameter SecurePassword -Type SecureString -Mandatory:$false + $Command | Should -HaveParameter SecurePassword -Type System.Security.SecureString -Mandatory:$false } It "Should have HashedPassword parameter" { - $Command | Should -HaveParameter HashedPassword -Type String -Mandatory:$false + $Command | Should -HaveParameter HashedPassword -Type System.String -Mandatory:$false } It "Should have MapToCertificate parameter" { - $Command | Should -HaveParameter MapToCertificate -Type String -Mandatory:$false + $Command | Should -HaveParameter MapToCertificate -Type System.String -Mandatory:$false } It "Should have MapToAsymmetricKey parameter" { - $Command | Should -HaveParameter MapToAsymmetricKey -Type String -Mandatory:$false + $Command | Should -HaveParameter MapToAsymmetricKey -Type System.String -Mandatory:$false } It "Should have MapToCredential parameter" { - $Command | Should -HaveParameter MapToCredential -Type String -Mandatory:$false + $Command | Should -HaveParameter MapToCredential -Type System.String -Mandatory:$false } It "Should have Sid parameter" { - $Command | Should -HaveParameter Sid -Type Object -Mandatory:$false + $Command | Should -HaveParameter Sid -Type System.Object -Mandatory:$false } It "Should have DefaultDatabase parameter" { - $Command | Should -HaveParameter DefaultDatabase -Type String -Mandatory:$false + $Command | Should -HaveParameter DefaultDatabase -Type System.String -Mandatory:$false } It "Should have Language parameter" { - $Command | Should -HaveParameter Language -Type String -Mandatory:$false + $Command | Should -HaveParameter Language -Type System.String -Mandatory:$false } It "Should have PasswordExpirationEnabled parameter" { - $Command | Should -HaveParameter PasswordExpirationEnabled -Type Switch -Mandatory:$false + $Command | Should -HaveParameter PasswordExpirationEnabled -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have PasswordPolicyEnforced parameter" { - $Command | Should -HaveParameter PasswordPolicyEnforced -Type Switch -Mandatory:$false + $Command | Should -HaveParameter PasswordPolicyEnforced -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have PasswordMustChange parameter" { - $Command | Should -HaveParameter PasswordMustChange -Type Switch -Mandatory:$false + $Command | Should -HaveParameter PasswordMustChange -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Disabled parameter" { - $Command | Should -HaveParameter Disabled -Type Switch -Mandatory:$false + $Command | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DenyWindowsLogin parameter" { - $Command | Should -HaveParameter DenyWindowsLogin -Type Switch -Mandatory:$false + $Command | Should -HaveParameter DenyWindowsLogin -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NewSid parameter" { - $Command | Should -HaveParameter NewSid -Type Switch -Mandatory:$false + $Command | Should -HaveParameter NewSid -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExternalProvider parameter" { - $Command | Should -HaveParameter ExternalProvider -Type Switch -Mandatory:$false + $Command | Should -HaveParameter ExternalProvider -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Force parameter" { - $Command | Should -HaveParameter Force -Type Switch -Mandatory:$false + $Command | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $Command | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $Command | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaReplCreationScriptOptions.Tests.ps1 b/tests/New-DbaReplCreationScriptOptions.Tests.ps1 index be4fd646af..df1091ddf4 100644 --- a/tests/New-DbaReplCreationScriptOptions.Tests.ps1 +++ b/tests/New-DbaReplCreationScriptOptions.Tests.ps1 @@ -10,11 +10,11 @@ Describe "New-DbaReplCreationScriptOptions" { BeforeAll { $CommandUnderTest = Get-Command New-DbaReplCreationScriptOptions } - It "Should have Options as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Options -Type String[] -Mandatory:$false + It "Should have Options as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Options -Type System.String[] -Mandatory:$false } It "Should have NoDefaults as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NoDefaults -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoDefaults -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/New-DbaReplPublication.Tests.ps1 b/tests/New-DbaReplPublication.Tests.ps1 index 0d709c4cc7..0bde55ec2f 100644 --- a/tests/New-DbaReplPublication.Tests.ps1 +++ b/tests/New-DbaReplPublication.Tests.ps1 @@ -11,25 +11,25 @@ Describe "New-DbaReplPublication" { $CommandUnderTest = Get-Command New-DbaReplPublication } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have Name parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String + $CommandUnderTest | Should -HaveParameter Type -Type System.String } It "Should have LogReaderAgentCredential parameter" { - $CommandUnderTest | Should -HaveParameter LogReaderAgentCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter LogReaderAgentCredential -Type System.Management.Automation.PSCredential } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/New-DbaReplSubscription.Tests.ps1 b/tests/New-DbaReplSubscription.Tests.ps1 index 6b8ce16988..fc8bcecc08 100644 --- a/tests/New-DbaReplSubscription.Tests.ps1 +++ b/tests/New-DbaReplSubscription.Tests.ps1 @@ -11,37 +11,37 @@ Describe "New-DbaReplSubscription" { $CommandUnderTest = Get-Command New-DbaReplSubscription } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have SubscriberSqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SubscriberSqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SubscriberSqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SubscriberSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SubscriberSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SubscriberSqlCredential -Type System.Management.Automation.PSCredential } It "Should have SubscriptionDatabase parameter" { - $CommandUnderTest | Should -HaveParameter SubscriptionDatabase -Type String + $CommandUnderTest | Should -HaveParameter SubscriptionDatabase -Type System.String } It "Should have PublicationName parameter" { - $CommandUnderTest | Should -HaveParameter PublicationName -Type String + $CommandUnderTest | Should -HaveParameter PublicationName -Type System.String } It "Should have SubscriptionSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SubscriptionSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SubscriptionSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String + $CommandUnderTest | Should -HaveParameter Type -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have Confirm parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/New-DbaRgResourcePool.Tests.ps1 b/tests/New-DbaRgResourcePool.Tests.ps1 index 60fdeb7ff4..52b2ec0e97 100644 --- a/tests/New-DbaRgResourcePool.Tests.ps1 +++ b/tests/New-DbaRgResourcePool.Tests.ps1 @@ -10,49 +10,49 @@ Describe "New-DbaRgResourcePool" { $CommandUnderTest = Get-Command New-DbaRgResourcePool } 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 ResourcePool parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePool -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResourcePool -Type System.String[] -Mandatory:$false } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false } It "Should have MinimumCpuPercentage parameter" { - $CommandUnderTest | Should -HaveParameter MinimumCpuPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinimumCpuPercentage -Type System.Int32 -Mandatory:$false } It "Should have MaximumCpuPercentage parameter" { - $CommandUnderTest | Should -HaveParameter MaximumCpuPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumCpuPercentage -Type System.Int32 -Mandatory:$false } It "Should have CapCpuPercentage parameter" { - $CommandUnderTest | Should -HaveParameter CapCpuPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CapCpuPercentage -Type System.Int32 -Mandatory:$false } It "Should have MinimumMemoryPercentage parameter" { - $CommandUnderTest | Should -HaveParameter MinimumMemoryPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinimumMemoryPercentage -Type System.Int32 -Mandatory:$false } It "Should have MaximumMemoryPercentage parameter" { - $CommandUnderTest | Should -HaveParameter MaximumMemoryPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumMemoryPercentage -Type System.Int32 -Mandatory:$false } It "Should have MinimumIOPSPerVolume parameter" { - $CommandUnderTest | Should -HaveParameter MinimumIOPSPerVolume -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinimumIOPSPerVolume -Type System.Int32 -Mandatory:$false } It "Should have MaximumIOPSPerVolume parameter" { - $CommandUnderTest | Should -HaveParameter MaximumIOPSPerVolume -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumIOPSPerVolume -Type System.Int32 -Mandatory:$false } It "Should have MaximumProcesses parameter" { - $CommandUnderTest | Should -HaveParameter MaximumProcesses -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumProcesses -Type System.Int32 -Mandatory:$false } It "Should have SkipReconfigure parameter" { - $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Force parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaRgWorkloadGroup.Tests.ps1 b/tests/New-DbaRgWorkloadGroup.Tests.ps1 index db88236778..c080bda0ef 100644 --- a/tests/New-DbaRgWorkloadGroup.Tests.ps1 +++ b/tests/New-DbaRgWorkloadGroup.Tests.ps1 @@ -18,40 +18,40 @@ Describe "New-DbaRgWorkloadGroup" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have WorkloadGroup parameter" { - $CommandUnderTest | Should -HaveParameter WorkloadGroup -Type String[] + $CommandUnderTest | Should -HaveParameter WorkloadGroup -Type System.String[] } It "Should have ResourcePool parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePool -Type String + $CommandUnderTest | Should -HaveParameter ResourcePool -Type System.String } It "Should have ResourcePoolType parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePoolType -Type String + $CommandUnderTest | Should -HaveParameter ResourcePoolType -Type System.String } It "Should have Importance parameter" { - $CommandUnderTest | Should -HaveParameter Importance -Type String + $CommandUnderTest | Should -HaveParameter Importance -Type System.String } It "Should have RequestMaximumMemoryGrantPercentage parameter" { - $CommandUnderTest | Should -HaveParameter RequestMaximumMemoryGrantPercentage -Type Int32 + $CommandUnderTest | Should -HaveParameter RequestMaximumMemoryGrantPercentage -Type System.Int32 } It "Should have RequestMaximumCpuTimeInSeconds parameter" { - $CommandUnderTest | Should -HaveParameter RequestMaximumCpuTimeInSeconds -Type Int32 + $CommandUnderTest | Should -HaveParameter RequestMaximumCpuTimeInSeconds -Type System.Int32 } It "Should have RequestMemoryGrantTimeoutInSeconds parameter" { - $CommandUnderTest | Should -HaveParameter RequestMemoryGrantTimeoutInSeconds -Type Int32 + $CommandUnderTest | Should -HaveParameter RequestMemoryGrantTimeoutInSeconds -Type System.Int32 } It "Should have MaximumDegreeOfParallelism parameter" { - $CommandUnderTest | Should -HaveParameter MaximumDegreeOfParallelism -Type Int32 + $CommandUnderTest | Should -HaveParameter MaximumDegreeOfParallelism -Type System.Int32 } It "Should have GroupMaximumRequests parameter" { - $CommandUnderTest | Should -HaveParameter GroupMaximumRequests -Type Int32 + $CommandUnderTest | Should -HaveParameter GroupMaximumRequests -Type System.Int32 } It "Should have SkipReconfigure parameter" { - $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type Switch + $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type System.Management.Automation.SwitchParameter } 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 } } diff --git a/tests/New-DbaScriptingOption.Tests.ps1 b/tests/New-DbaScriptingOption.Tests.ps1 index c2a5101ea7..ad38ecb40b 100644 --- a/tests/New-DbaScriptingOption.Tests.ps1 +++ b/tests/New-DbaScriptingOption.Tests.ps1 @@ -12,8 +12,8 @@ Describe "New-DbaScriptingOption" { $CommandUnderTest = Get-Command New-DbaScriptingOption } It "Should have the correct parameters" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory -Alias 'ConnectionString' - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory -Alias 'ConnectionString' + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential # Add more parameter checks as needed } } diff --git a/tests/New-DbaServerRole.Tests.ps1 b/tests/New-DbaServerRole.Tests.ps1 index 687ff65297..ba6b57f0db 100644 --- a/tests/New-DbaServerRole.Tests.ps1 +++ b/tests/New-DbaServerRole.Tests.ps1 @@ -16,13 +16,13 @@ Describe "New-DbaServerRole" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have ServerRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerRole -Type String[] + $CommandUnderTest | Should -HaveParameter ServerRole -Type System.String[] } It "Should have Owner as a parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String + $CommandUnderTest | Should -HaveParameter Owner -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaServiceMasterKey.Tests.ps1 b/tests/New-DbaServiceMasterKey.Tests.ps1 index ee7df198fa..6482cbfebc 100644 --- a/tests/New-DbaServiceMasterKey.Tests.ps1 +++ b/tests/New-DbaServiceMasterKey.Tests.ps1 @@ -9,16 +9,16 @@ Describe "New-DbaServiceMasterKey" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.Credential } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type Microsoft.SqlServer.Management.Smo.Credential } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/New-DbaSqlParameter.Tests.ps1 b/tests/New-DbaSqlParameter.Tests.ps1 index 6c075bb33a..861c9bb08e 100644 --- a/tests/New-DbaSqlParameter.Tests.ps1 +++ b/tests/New-DbaSqlParameter.Tests.ps1 @@ -5,65 +5,65 @@ Describe "New-DbaSqlParameter" { BeforeAll { $CommandUnderTest = Get-Command New-DbaSqlParameter } - It "Should have CompareInfo as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter CompareInfo -Type String -Mandatory:$false + It "Should have CompareInfo as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter CompareInfo -Type System.String -Mandatory:$false } - It "Should have DbType as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter DbType -Type String -Mandatory:$false + It "Should have DbType as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter DbType -Type System.String -Mandatory:$false } - It "Should have Direction as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Direction -Type String -Mandatory:$false + It "Should have Direction as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Direction -Type System.String -Mandatory:$false } - It "Should have ForceColumnEncryption as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter ForceColumnEncryption -Type Switch -Mandatory:$false + It "Should have ForceColumnEncryption as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter ForceColumnEncryption -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have IsNullable as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter IsNullable -Type Switch -Mandatory:$false + It "Should have IsNullable as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter IsNullable -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have LocaleId as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter LocaleId -Type Int32 -Mandatory:$false + It "Should have LocaleId as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter LocaleId -Type System.Int32 -Mandatory:$false } - It "Should have Offset as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Offset -Type String -Mandatory:$false + It "Should have Offset as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Offset -Type System.String -Mandatory:$false } - It "Should have ParameterName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ParameterName -Type String -Mandatory:$false + It "Should have ParameterName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter ParameterName -Type System.String -Mandatory:$false } - It "Should have Precision as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Precision -Type String -Mandatory:$false + It "Should have Precision as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Precision -Type System.String -Mandatory:$false } - It "Should have Scale as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Scale -Type String -Mandatory:$false + It "Should have Scale as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Scale -Type System.String -Mandatory:$false } - It "Should have Size as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter Size -Type Int32 -Mandatory:$false + It "Should have Size as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter Size -Type System.Int32 -Mandatory:$false } - It "Should have SourceColumn as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter SourceColumn -Type String -Mandatory:$false + It "Should have SourceColumn as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter SourceColumn -Type System.String -Mandatory:$false } - It "Should have SourceColumnNullMapping as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter SourceColumnNullMapping -Type Switch -Mandatory:$false + It "Should have SourceColumnNullMapping as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter SourceColumnNullMapping -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have SourceVersion as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter SourceVersion -Type String -Mandatory:$false + It "Should have SourceVersion as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter SourceVersion -Type System.String -Mandatory:$false } - It "Should have SqlDbType as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter SqlDbType -Type String -Mandatory:$false + It "Should have SqlDbType as a non-mandatory Microsoft.Data.SqlClient.SqlDbType parameter" { + $CommandUnderTest | Should -HaveParameter SqlDbType -Type Microsoft.Data.SqlClient.SqlDbType -Mandatory:$false } - It "Should have SqlValue as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter SqlValue -Type String -Mandatory:$false + It "Should have SqlValue as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter SqlValue -Type System.String -Mandatory:$false } - It "Should have TypeName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter TypeName -Type String -Mandatory:$false + It "Should have TypeName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter TypeName -Type System.String -Mandatory:$false } - It "Should have UdtTypeName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter UdtTypeName -Type String -Mandatory:$false + It "Should have UdtTypeName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter UdtTypeName -Type System.String -Mandatory:$false } - It "Should have Value as a non-mandatory Object parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type Object -Mandatory:$false + It "Should have Value as a non-mandatory System.Object parameter" { + $CommandUnderTest | Should -HaveParameter Value -Type System.Object -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } @@ -94,7 +94,7 @@ Describe "New-DbaSqlParameter Integration Tests" -Tag "IntegrationTests" { } It "creates a usable sql parameter" { - $output = New-DbaSqlParameter -ParameterName json_result -SqlDbType NVarChar -Size -1 -Direction Output + $output = New-DbaSqlParameter -ParameterName json_result -SqlDbType Microsoft.Data.SqlClient.SqlDbType.NVarChar -Size -1 -Direction Output Invoke-DbaQuery -SqlInstance $global:instance2 -Database tempdb -CommandType StoredProcedure -Query my_proc -SqlParameters $output $output.Value | Should -Be '{"example":"sample"}' } diff --git a/tests/New-DbaSsisCatalog.Tests.ps1 b/tests/New-DbaSsisCatalog.Tests.ps1 index b1b5de00a5..e552a97b87 100644 --- a/tests/New-DbaSsisCatalog.Tests.ps1 +++ b/tests/New-DbaSsisCatalog.Tests.ps1 @@ -9,19 +9,19 @@ Describe "New-DbaSsisCatalog" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have SsisCatalog as a parameter" { - $CommandUnderTest | Should -HaveParameter SsisCatalog -Type String + $CommandUnderTest | Should -HaveParameter SsisCatalog -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaXESession.Tests.ps1 b/tests/New-DbaXESession.Tests.ps1 index 52efff67c4..a9ec6339a8 100644 --- a/tests/New-DbaXESession.Tests.ps1 +++ b/tests/New-DbaXESession.Tests.ps1 @@ -9,23 +9,23 @@ Describe "New-DbaXESession" { BeforeAll { $CommandUnderTest = Get-Command New-DbaXESession } - 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 Name as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + It "Should have Name as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Name -Type System.String -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 } It "Should have WhatIf as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaXESmartCsvWriter.Tests.ps1 b/tests/New-DbaXESmartCsvWriter.Tests.ps1 index d45b742bee..068d2d5610 100644 --- a/tests/New-DbaXESmartCsvWriter.Tests.ps1 +++ b/tests/New-DbaXESmartCsvWriter.Tests.ps1 @@ -11,23 +11,23 @@ Describe "New-DbaXESmartCsvWriter" { BeforeAll { $CommandUnderTest = Get-Command New-DbaXESmartCsvWriter } - It "Should have OutputFile as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter OutputFile -Type String -Mandatory:$false + It "Should have OutputFile as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter OutputFile -Type System.String -Mandatory:$false } - It "Should have Overwrite as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Overwrite -Type Switch -Mandatory:$false + It "Should have Overwrite as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Overwrite -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have Event as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Event -Type String[] -Mandatory:$false + It "Should have Event as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Event -Type System.String[] -Mandatory:$false } - It "Should have OutputColumn as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter OutputColumn -Type String[] -Mandatory:$false + It "Should have OutputColumn as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter OutputColumn -Type System.String[] -Mandatory:$false } - It "Should have Filter as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Filter -Type String -Mandatory:$false + It "Should have Filter as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Filter -Type System.String -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/New-DbaXESmartEmail.Tests.ps1 b/tests/New-DbaXESmartEmail.Tests.ps1 index 5903a536dc..b4c8c1aa49 100644 --- a/tests/New-DbaXESmartEmail.Tests.ps1 +++ b/tests/New-DbaXESmartEmail.Tests.ps1 @@ -12,46 +12,46 @@ Describe "New-DbaXESmartEmail" { $CommandUnderTest = Get-Command New-DbaXESmartEmail } It "Should have SmtpServer parameter" { - $CommandUnderTest | Should -HaveParameter SmtpServer -Type String + $CommandUnderTest | Should -HaveParameter SmtpServer -Type System.String } It "Should have Sender parameter" { - $CommandUnderTest | Should -HaveParameter Sender -Type String + $CommandUnderTest | Should -HaveParameter Sender -Type System.String } It "Should have To parameter" { - $CommandUnderTest | Should -HaveParameter To -Type String[] + $CommandUnderTest | Should -HaveParameter To -Type System.String[] } It "Should have Cc parameter" { - $CommandUnderTest | Should -HaveParameter Cc -Type String[] + $CommandUnderTest | Should -HaveParameter Cc -Type System.String[] } It "Should have Bcc parameter" { - $CommandUnderTest | Should -HaveParameter Bcc -Type String[] + $CommandUnderTest | Should -HaveParameter Bcc -Type System.String[] } It "Should have Credential parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Subject parameter" { - $CommandUnderTest | Should -HaveParameter Subject -Type String + $CommandUnderTest | Should -HaveParameter Subject -Type System.String } It "Should have Body parameter" { - $CommandUnderTest | Should -HaveParameter Body -Type String + $CommandUnderTest | Should -HaveParameter Body -Type System.String } It "Should have Attachment parameter" { - $CommandUnderTest | Should -HaveParameter Attachment -Type String + $CommandUnderTest | Should -HaveParameter Attachment -Type System.String } It "Should have AttachmentFileName parameter" { - $CommandUnderTest | Should -HaveParameter AttachmentFileName -Type String + $CommandUnderTest | Should -HaveParameter AttachmentFileName -Type System.String } It "Should have PlainText parameter" { - $CommandUnderTest | Should -HaveParameter PlainText -Type String + $CommandUnderTest | Should -HaveParameter PlainText -Type System.String } It "Should have Event parameter" { - $CommandUnderTest | Should -HaveParameter Event -Type String[] + $CommandUnderTest | Should -HaveParameter Event -Type System.String[] } It "Should have Filter parameter" { - $CommandUnderTest | Should -HaveParameter Filter -Type String + $CommandUnderTest | Should -HaveParameter Filter -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/New-DbaXESmartQueryExec.Tests.ps1 b/tests/New-DbaXESmartQueryExec.Tests.ps1 index ea9b63f912..e4c22f76cf 100644 --- a/tests/New-DbaXESmartQueryExec.Tests.ps1 +++ b/tests/New-DbaXESmartQueryExec.Tests.ps1 @@ -18,19 +18,19 @@ Describe "New-DbaXESmartQueryExec" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have Query as a parameter" { - $CommandUnderTest | Should -HaveParameter Query -Type String + $CommandUnderTest | Should -HaveParameter Query -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have Event as a parameter" { - $CommandUnderTest | Should -HaveParameter Event -Type String[] + $CommandUnderTest | Should -HaveParameter Event -Type System.String[] } It "Should have Filter as a parameter" { - $CommandUnderTest | Should -HaveParameter Filter -Type String + $CommandUnderTest | Should -HaveParameter Filter -Type System.String } } diff --git a/tests/New-DbaXESmartReplay.Tests.ps1 b/tests/New-DbaXESmartReplay.Tests.ps1 index 2ea40dfe50..4e42cb5aba 100644 --- a/tests/New-DbaXESmartReplay.Tests.ps1 +++ b/tests/New-DbaXESmartReplay.Tests.ps1 @@ -16,25 +16,25 @@ Describe "New-DbaXESmartReplay" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String -Mandatory:$false } It "Should have Event parameter" { - $CommandUnderTest | Should -HaveParameter Event -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Event -Type System.String[] -Mandatory:$false } It "Should have Filter parameter" { - $CommandUnderTest | Should -HaveParameter Filter -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Filter -Type System.String -Mandatory:$false } It "Should have DelaySeconds parameter" { - $CommandUnderTest | Should -HaveParameter DelaySeconds -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DelaySeconds -Type System.Int32 -Mandatory:$false } It "Should have StopOnError parameter" { - $CommandUnderTest | Should -HaveParameter StopOnError -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StopOnError -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ReplayIntervalSeconds parameter" { - $CommandUnderTest | Should -HaveParameter ReplayIntervalSeconds -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ReplayIntervalSeconds -Type System.Int32 -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/New-DbaXESmartTableWriter.Tests.ps1 b/tests/New-DbaXESmartTableWriter.Tests.ps1 index 7c57f6c217..e7d8c325db 100644 --- a/tests/New-DbaXESmartTableWriter.Tests.ps1 +++ b/tests/New-DbaXESmartTableWriter.Tests.ps1 @@ -11,35 +11,35 @@ Describe "New-DbaXESmartTableWriter" { BeforeAll { $CommandUnderTest = Get-Command New-DbaXESmartTableWriter } - 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 Database as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Database -Type String -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String -Mandatory:$false } - It "Should have Table as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Table -Type String -Mandatory:$false + It "Should have Table as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Table -Type System.String -Mandatory:$false } It "Should have AutoCreateTargetTable as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter AutoCreateTargetTable -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AutoCreateTargetTable -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have UploadIntervalSeconds as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter UploadIntervalSeconds -Type Int32 -Mandatory:$false + It "Should have UploadIntervalSeconds as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter UploadIntervalSeconds -Type System.Int32 -Mandatory:$false } - It "Should have Event as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Event -Type String[] -Mandatory:$false + It "Should have Event as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Event -Type System.String[] -Mandatory:$false } - It "Should have OutputColumn as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter OutputColumn -Type String[] -Mandatory:$false + It "Should have OutputColumn as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter OutputColumn -Type System.String[] -Mandatory:$false } - It "Should have Filter as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Filter -Type String -Mandatory:$false + It "Should have Filter as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Filter -Type System.String -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 } } diff --git a/tests/New-DbatoolsSupportPackage.Tests.ps1 b/tests/New-DbatoolsSupportPackage.Tests.ps1 index 5581ea23b7..1e5f1d7c08 100644 --- a/tests/New-DbatoolsSupportPackage.Tests.ps1 +++ b/tests/New-DbatoolsSupportPackage.Tests.ps1 @@ -10,23 +10,23 @@ Describe "New-DbatoolsSupportPackage" { BeforeAll { $CommandUnderTest = Get-Command New-DbatoolsSupportPackage } - It "Should have Path as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } - It "Should have Variables as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Variables -Type String[] -Mandatory:$false + It "Should have Variables as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Variables -Type System.String[] -Mandatory:$false } - It "Should have PassThru as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter PassThru -Type Switch -Mandatory:$false + It "Should have PassThru as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter PassThru -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have WhatIf as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + It "Should have WhatIf as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have Confirm as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + It "Should have Confirm as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Publish-DbaDacPackage.Tests.ps1 b/tests/Publish-DbaDacPackage.Tests.ps1 index b7a97fbd28..6efab4f609 100644 --- a/tests/Publish-DbaDacPackage.Tests.ps1 +++ b/tests/Publish-DbaDacPackage.Tests.ps1 @@ -12,40 +12,40 @@ Describe "Publish-DbaDacPackage" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have PublishXml parameter" { - $CommandUnderTest | Should -HaveParameter PublishXml -Type String + $CommandUnderTest | Should -HaveParameter PublishXml -Type System.String } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ConnectionString parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionString -Type String[] + $CommandUnderTest | Should -HaveParameter ConnectionString -Type System.String[] } It "Should have GenerateDeploymentReport parameter" { - $CommandUnderTest | Should -HaveParameter GenerateDeploymentReport -Type Switch + $CommandUnderTest | Should -HaveParameter GenerateDeploymentReport -Type System.Management.Automation.SwitchParameter } It "Should have ScriptOnly parameter" { - $CommandUnderTest | Should -HaveParameter ScriptOnly -Type Switch + $CommandUnderTest | Should -HaveParameter ScriptOnly -Type System.Management.Automation.SwitchParameter } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String + $CommandUnderTest | Should -HaveParameter Type -Type System.String } It "Should have OutputPath parameter" { - $CommandUnderTest | Should -HaveParameter OutputPath -Type String + $CommandUnderTest | Should -HaveParameter OutputPath -Type System.String } It "Should have IncludeSqlCmdVars parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSqlCmdVars -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSqlCmdVars -Type System.Management.Automation.SwitchParameter } It "Should have DacOption parameter" { $CommandUnderTest | Should -HaveParameter DacOption -Type Object } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have DacFxPath parameter" { - $CommandUnderTest | Should -HaveParameter DacFxPath -Type String + $CommandUnderTest | Should -HaveParameter DacFxPath -Type System.String } } diff --git a/tests/Read-DbaAuditFile.Tests.ps1 b/tests/Read-DbaAuditFile.Tests.ps1 index 67390cc1a1..d9206c345b 100644 --- a/tests/Read-DbaAuditFile.Tests.ps1 +++ b/tests/Read-DbaAuditFile.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Read-DbaAuditFile" { $CommandUnderTest = Get-Command Read-DbaAuditFile } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.Object[] -Mandatory:$false } It "Should have Raw as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Raw -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Read-DbaBackupHeader.Tests.ps1 b/tests/Read-DbaBackupHeader.Tests.ps1 index 71bfec3fd0..53cdf91367 100644 --- a/tests/Read-DbaBackupHeader.Tests.ps1 +++ b/tests/Read-DbaBackupHeader.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Read-DbaBackupHeader" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type Object[] + $CommandUnderTest | Should -HaveParameter Path -Type System.Object[] } It "Should have Simple parameter" { - $CommandUnderTest | Should -HaveParameter Simple -Type Switch + $CommandUnderTest | Should -HaveParameter Simple -Type System.Management.Automation.SwitchParameter } It "Should have FileList parameter" { - $CommandUnderTest | Should -HaveParameter FileList -Type Switch + $CommandUnderTest | Should -HaveParameter FileList -Type System.Management.Automation.SwitchParameter } It "Should have AzureCredential parameter" { - $CommandUnderTest | Should -HaveParameter AzureCredential -Type String + $CommandUnderTest | Should -HaveParameter AzureCredential -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Read-DbaTraceFile.Tests.ps1 b/tests/Read-DbaTraceFile.Tests.ps1 index 815dabab72..1e34b4ba99 100644 --- a/tests/Read-DbaTraceFile.Tests.ps1 +++ b/tests/Read-DbaTraceFile.Tests.ps1 @@ -29,43 +29,43 @@ Describe "Read-DbaTraceFile" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String[] + $CommandUnderTest | Should -HaveParameter Path -Type System.String[] } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Login parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have Spid parameter" { - $CommandUnderTest | Should -HaveParameter Spid -Type Int32[] + $CommandUnderTest | Should -HaveParameter Spid -Type System.Int32[] } It "Should have EventClass parameter" { - $CommandUnderTest | Should -HaveParameter EventClass -Type String[] + $CommandUnderTest | Should -HaveParameter EventClass -Type System.String[] } It "Should have ObjectType parameter" { - $CommandUnderTest | Should -HaveParameter ObjectType -Type String[] + $CommandUnderTest | Should -HaveParameter ObjectType -Type System.String[] } It "Should have ErrorId parameter" { - $CommandUnderTest | Should -HaveParameter ErrorId -Type Int32[] + $CommandUnderTest | Should -HaveParameter ErrorId -Type System.Int32[] } It "Should have EventSequence parameter" { - $CommandUnderTest | Should -HaveParameter EventSequence -Type Int32[] + $CommandUnderTest | Should -HaveParameter EventSequence -Type System.Int32[] } It "Should have TextData parameter" { - $CommandUnderTest | Should -HaveParameter TextData -Type String[] + $CommandUnderTest | Should -HaveParameter TextData -Type System.String[] } It "Should have ApplicationName parameter" { - $CommandUnderTest | Should -HaveParameter ApplicationName -Type String[] + $CommandUnderTest | Should -HaveParameter ApplicationName -Type System.String[] } It "Should have ObjectName parameter" { - $CommandUnderTest | Should -HaveParameter ObjectName -Type String[] + $CommandUnderTest | Should -HaveParameter ObjectName -Type System.String[] } It "Should have Where parameter" { - $CommandUnderTest | Should -HaveParameter Where -Type String + $CommandUnderTest | Should -HaveParameter Where -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Read-DbaTransactionLog.Tests.ps1 b/tests/Read-DbaTransactionLog.Tests.ps1 index 2a4913a308..1b29e2de17 100644 --- a/tests/Read-DbaTransactionLog.Tests.ps1 +++ b/tests/Read-DbaTransactionLog.Tests.ps1 @@ -18,16 +18,16 @@ Describe "Read-DbaTransactionLog" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object + $CommandUnderTest | Should -HaveParameter Database -Type System.Object } It "Should have IgnoreLimit parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreLimit -Type Switch + $CommandUnderTest | Should -HaveParameter IgnoreLimit -Type System.Management.Automation.SwitchParameter } It "Should have RowLimit parameter" { - $CommandUnderTest | Should -HaveParameter RowLimit -Type Int32 + $CommandUnderTest | Should -HaveParameter RowLimit -Type System.Int32 } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Read-DbaXEFile.Tests.ps1 b/tests/Read-DbaXEFile.Tests.ps1 index 6fe41f9d1e..ecc1e01cb3 100644 --- a/tests/Read-DbaXEFile.Tests.ps1 +++ b/tests/Read-DbaXEFile.Tests.ps1 @@ -13,13 +13,13 @@ Describe "Read-DbaXEFile" { $CommandUnderTest = Get-Command Read-DbaXEFile } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.Object[] -Mandatory:$false } It "Should have Raw as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Raw -Type switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Raw -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Register-DbatoolsConfig.Tests.ps1 b/tests/Register-DbatoolsConfig.Tests.ps1 index 80a0f94f92..23a9070986 100644 --- a/tests/Register-DbatoolsConfig.Tests.ps1 +++ b/tests/Register-DbatoolsConfig.Tests.ps1 @@ -9,19 +9,19 @@ Describe "Register-DbatoolsConfig" { $CommandUnderTest | Should -HaveParameter Config -Type Dataplat.Dbatools.Configuration.Config[] } It "Accepts FullName as a parameter" { - $CommandUnderTest | Should -HaveParameter FullName -Type String[] + $CommandUnderTest | Should -HaveParameter FullName -Type System.String[] } It "Accepts Module as a parameter" { - $CommandUnderTest | Should -HaveParameter Module -Type String + $CommandUnderTest | Should -HaveParameter Module -Type System.String } It "Accepts Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Accepts Scope as a parameter" { $CommandUnderTest | Should -HaveParameter Scope -Type Dataplat.Dbatools.Configuration.ConfigScope } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaAgDatabase.Tests.ps1 b/tests/Remove-DbaAgDatabase.Tests.ps1 index 00d39ed259..d70b4d452c 100644 --- a/tests/Remove-DbaAgDatabase.Tests.ps1 +++ b/tests/Remove-DbaAgDatabase.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaAgDatabase" { $CommandUnderTest = Get-Command Remove-DbaAgDatabase } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaAgListener.Tests.ps1 b/tests/Remove-DbaAgListener.Tests.ps1 index 2b222d37d4..19af78ce12 100644 --- a/tests/Remove-DbaAgListener.Tests.ps1 +++ b/tests/Remove-DbaAgListener.Tests.ps1 @@ -5,22 +5,22 @@ Describe "Remove-DbaAgListener" { $CommandUnderTest = Get-Command Remove-DbaAgListener } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.PSCredential } It "Should have Listener as a parameter" { - $CommandUnderTest | Should -HaveParameter Listener -Type String[] + $CommandUnderTest | Should -HaveParameter Listener -Type System.String[] } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaAgReplica.Tests.ps1 b/tests/Remove-DbaAgReplica.Tests.ps1 index ff8e94d721..0693d0fb8d 100644 --- a/tests/Remove-DbaAgReplica.Tests.ps1 +++ b/tests/Remove-DbaAgReplica.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Remove-DbaAgReplica" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] } It "Should have Replica as a parameter" { - $CommandUnderTest | Should -HaveParameter Replica -Type String[] + $CommandUnderTest | Should -HaveParameter Replica -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityReplica[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.Switch } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.Switch } } diff --git a/tests/Remove-DbaAgentAlert.Tests.ps1 b/tests/Remove-DbaAgentAlert.Tests.ps1 index f452578c77..4b66cb3129 100644 --- a/tests/Remove-DbaAgentAlert.Tests.ps1 +++ b/tests/Remove-DbaAgentAlert.Tests.ps1 @@ -16,13 +16,13 @@ Describe "Remove-DbaAgentAlert Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Alert parameter" { - $CommandUnderTest | Should -HaveParameter Alert -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Alert -Type Microsoft.SqlServer.Management.Smo.Alert[] -Mandatory:$false } It "Should have ExcludeAlert parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeAlert -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeAlert -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Alert[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Alert[] -Mandatory:$false } It "Should have EnableException parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false diff --git a/tests/Remove-DbaAgentAlertCategory.Tests.ps1 b/tests/Remove-DbaAgentAlertCategory.Tests.ps1 index cb14199b18..966a551ccd 100644 --- a/tests/Remove-DbaAgentAlertCategory.Tests.ps1 +++ b/tests/Remove-DbaAgentAlertCategory.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Remove-DbaAgentAlertCategory" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 InputObject as a non-mandatory parameter of type AlertCategory[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type AlertCategory[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Agent.AlertCategory[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.AlertCategory[] -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 } } diff --git a/tests/Remove-DbaAgentJob.Tests.ps1 b/tests/Remove-DbaAgentJob.Tests.ps1 index 0b0c277e75..5923df8596 100644 --- a/tests/Remove-DbaAgentJob.Tests.ps1 +++ b/tests/Remove-DbaAgentJob.Tests.ps1 @@ -12,7 +12,7 @@ Describe "Remove-DbaAgentJob Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] -Mandatory:$false } It "Should have KeepHistory as a switch parameter" { $CommandUnderTest | Should -HaveParameter KeepHistory -Type switch -Mandatory:$false diff --git a/tests/Remove-DbaAgentJobCategory.Tests.ps1 b/tests/Remove-DbaAgentJobCategory.Tests.ps1 index 30ac6d7db0..775ee2a110 100644 --- a/tests/Remove-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Remove-DbaAgentJobCategory.Tests.ps1 @@ -11,17 +11,17 @@ Describe "Remove-DbaAgentJobCategory" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 CategoryType as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter CategoryType -Type String[] -Mandatory:$false + It "Should have CategoryType as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter CategoryType -Type System.String[] -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type JobCategory[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Agent.JobCategory[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.JobCategory[] -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 } } } diff --git a/tests/Remove-DbaAgentJobStep.Tests.ps1 b/tests/Remove-DbaAgentJobStep.Tests.ps1 index d2088841fa..66ca9e67d1 100644 --- a/tests/Remove-DbaAgentJobStep.Tests.ps1 +++ b/tests/Remove-DbaAgentJobStep.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Remove-DbaAgentJobStep" { $CommandUnderTest = Get-Command Remove-DbaAgentJobStep } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] } It "Should have StepName as a parameter" { - $CommandUnderTest | Should -HaveParameter StepName -Type String + $CommandUnderTest | Should -HaveParameter StepName -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Remove-DbaAgentOperator.Tests.ps1 b/tests/Remove-DbaAgentOperator.Tests.ps1 index 01456f1fc0..a7eeb050e6 100644 --- a/tests/Remove-DbaAgentOperator.Tests.ps1 +++ b/tests/Remove-DbaAgentOperator.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Remove-DbaAgentOperator" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Operator as a parameter" { - $CommandUnderTest | Should -HaveParameter Operator -Type String[] + $CommandUnderTest | Should -HaveParameter Operator -Type System.String[] } It "Should have ExcludeOperator as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeOperator -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeOperator -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Operator[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Operator[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Remove-DbaAgentProxy.Tests.ps1 b/tests/Remove-DbaAgentProxy.Tests.ps1 index 6eebb74ee8..97799ee774 100644 --- a/tests/Remove-DbaAgentProxy.Tests.ps1 +++ b/tests/Remove-DbaAgentProxy.Tests.ps1 @@ -9,19 +9,19 @@ Describe "Remove-DbaAgentProxy" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Proxy as a parameter" { - $CommandUnderTest | Should -HaveParameter Proxy -Type String[] + $CommandUnderTest | Should -HaveParameter Proxy -Type System.String[] } It "Should have ExcludeProxy as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeProxy -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeProxy -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type ProxyAccount[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.ProxyAccount[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Remove-DbaAvailabilityGroup.Tests.ps1 b/tests/Remove-DbaAvailabilityGroup.Tests.ps1 index d7aa5370ef..9fa3abc1da 100644 --- a/tests/Remove-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Remove-DbaAvailabilityGroup.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command Remove-DbaAvailabilityGroup } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] } It "Should have AllAvailabilityGroups as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllAvailabilityGroups -Type Switch + $CommandUnderTest | Should -HaveParameter AllAvailabilityGroups -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaBackup.Tests.ps1 b/tests/Remove-DbaBackup.Tests.ps1 index 6e459ecf41..a98569e6e2 100644 --- a/tests/Remove-DbaBackup.Tests.ps1 +++ b/tests/Remove-DbaBackup.Tests.ps1 @@ -17,22 +17,22 @@ Describe "Remove-DbaBackup" { $CommandUnderTest = Get-Command Remove-DbaBackup } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have BackupFileExtension as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupFileExtension -Type String + $CommandUnderTest | Should -HaveParameter BackupFileExtension -Type System.String } It "Should have RetentionPeriod as a parameter" { - $CommandUnderTest | Should -HaveParameter RetentionPeriod -Type String + $CommandUnderTest | Should -HaveParameter RetentionPeriod -Type System.String } It "Should have CheckArchiveBit as a switch parameter" { - $CommandUnderTest | Should -HaveParameter CheckArchiveBit -Type Switch + $CommandUnderTest | Should -HaveParameter CheckArchiveBit -Type System.Management.Automation.SwitchParameter } It "Should have RemoveEmptyBackupFolder as a switch parameter" { - $CommandUnderTest | Should -HaveParameter RemoveEmptyBackupFolder -Type Switch + $CommandUnderTest | Should -HaveParameter RemoveEmptyBackupFolder -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaClientAlias.Tests.ps1 b/tests/Remove-DbaClientAlias.Tests.ps1 index d447f9128e..f97ffea78f 100644 --- a/tests/Remove-DbaClientAlias.Tests.ps1 +++ b/tests/Remove-DbaClientAlias.Tests.ps1 @@ -19,16 +19,16 @@ Describe "Remove-DbaClientAlias" { $CommandUnderTest = Get-Command Remove-DbaClientAlias } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Alias as a parameter" { - $CommandUnderTest | Should -HaveParameter Alias -Type String[] + $CommandUnderTest | Should -HaveParameter Alias -Type System.String[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaCmConnection.Tests.ps1 b/tests/Remove-DbaCmConnection.Tests.ps1 index 50bcea5e44..7fdf87da6f 100644 --- a/tests/Remove-DbaCmConnection.Tests.ps1 +++ b/tests/Remove-DbaCmConnection.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Remove-DbaCmConnection" { $CommandUnderTest = Get-Command Remove-DbaCmConnection } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaCmConnectionParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaCmConnectionParameter[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaComputerCertificate.Tests.ps1 b/tests/Remove-DbaComputerCertificate.Tests.ps1 index b58f44f9c7..c916f2db03 100644 --- a/tests/Remove-DbaComputerCertificate.Tests.ps1 +++ b/tests/Remove-DbaComputerCertificate.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Remove-DbaComputerCertificate" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential } It "Should have Thumbprint as a parameter" { - $CommandUnderTest | Should -HaveParameter Thumbprint -Type String[] + $CommandUnderTest | Should -HaveParameter Thumbprint -Type System.String[] } It "Should have Store as a parameter" { - $CommandUnderTest | Should -HaveParameter Store -Type String + $CommandUnderTest | Should -HaveParameter Store -Type System.String } It "Should have Folder as a parameter" { - $CommandUnderTest | Should -HaveParameter Folder -Type String + $CommandUnderTest | Should -HaveParameter Folder -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaCredential.Tests.ps1 b/tests/Remove-DbaCredential.Tests.ps1 index d452c3a6bb..d8d032eca2 100644 --- a/tests/Remove-DbaCredential.Tests.ps1 +++ b/tests/Remove-DbaCredential.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Remove-DbaCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type String[] + $CommandUnderTest | Should -HaveParameter Credential -Type System.String[] } It "Should have ExcludeCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeCredential -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeCredential -Type System.String[] } It "Should have Identity as a parameter" { - $CommandUnderTest | Should -HaveParameter Identity -Type String[] + $CommandUnderTest | Should -HaveParameter Identity -Type System.String[] } It "Should have ExcludeIdentity as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeIdentity -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeIdentity -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Credential[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Credential[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Remove-DbaCustomError.Tests.ps1 b/tests/Remove-DbaCustomError.Tests.ps1 index fcc067d8a0..e1d813d3db 100644 --- a/tests/Remove-DbaCustomError.Tests.ps1 +++ b/tests/Remove-DbaCustomError.Tests.ps1 @@ -48,13 +48,13 @@ Describe "Remove-DbaCustomError" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have MessageID as a parameter" { - $CommandUnderTest | Should -HaveParameter MessageID -Type Int32 + $CommandUnderTest | Should -HaveParameter MessageID -Type System.Int32 } It "Should have Language as a parameter" { - $CommandUnderTest | Should -HaveParameter Language -Type String + $CommandUnderTest | Should -HaveParameter Language -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaDatabase.Tests.ps1 b/tests/Remove-DbaDatabase.Tests.ps1 index d412ef4657..1b1b8dd53e 100644 --- a/tests/Remove-DbaDatabase.Tests.ps1 +++ b/tests/Remove-DbaDatabase.Tests.ps1 @@ -16,13 +16,13 @@ Describe "Remove-DbaDatabase" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaDatabaseSafely.Tests.ps1 b/tests/Remove-DbaDatabaseSafely.Tests.ps1 index 0042e3879a..88773ef324 100644 --- a/tests/Remove-DbaDatabaseSafely.Tests.ps1 +++ b/tests/Remove-DbaDatabaseSafely.Tests.ps1 @@ -11,47 +11,47 @@ Describe "Remove-DbaDatabaseSafely" { BeforeAll { $CommandUnderTest = Get-Command Remove-DbaDatabaseSafely } - 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 Database as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } - It "Should have Destination as a non-mandatory parameter of type DbaInstanceParameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter -Mandatory:$false + It "Should have Destination as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter" { + $CommandUnderTest | Should -HaveParameter Destination -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false } - It "Should have DestinationSqlCredential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential -Mandatory:$false + It "Should have DestinationSqlCredential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have NoDbccCheckDb as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NoDbccCheckDb -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoDbccCheckDb -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have BackupFolder as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter BackupFolder -Type String -Mandatory:$false + It "Should have BackupFolder as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter BackupFolder -Type System.String -Mandatory:$false } - It "Should have CategoryName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter CategoryName -Type String -Mandatory:$false + It "Should have CategoryName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter CategoryName -Type System.String -Mandatory:$false } - It "Should have JobOwner as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter JobOwner -Type String -Mandatory:$false + It "Should have JobOwner as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter JobOwner -Type System.String -Mandatory:$false } It "Should have AllDatabases as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have BackupCompression as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter BackupCompression -Type String -Mandatory:$false + It "Should have BackupCompression as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter BackupCompression -Type System.String -Mandatory:$false } It "Should have ReuseSourceFolderStructure as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ReuseSourceFolderStructure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ReuseSourceFolderStructure -Type System.Management.Automation.SwitchParameter -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 } } diff --git a/tests/Remove-DbaDbAsymmetricKey.Tests.ps1 b/tests/Remove-DbaDbAsymmetricKey.Tests.ps1 index 198ac01e66..0b172749c5 100644 --- a/tests/Remove-DbaDbAsymmetricKey.Tests.ps1 +++ b/tests/Remove-DbaDbAsymmetricKey.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaDbAsymmetricKey" { $CommandUnderTest = Get-Command Remove-DbaDbAsymmetricKey } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type AsymmetricKey[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AsymmetricKey[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Remove-DbaDbBackupRestoreHistory.Tests.ps1 b/tests/Remove-DbaDbBackupRestoreHistory.Tests.ps1 index 58529d6d4e..29bfa14f64 100644 --- a/tests/Remove-DbaDbBackupRestoreHistory.Tests.ps1 +++ b/tests/Remove-DbaDbBackupRestoreHistory.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaDbBackupRestoreHistory" { $CommandUnderTest = Get-Command Remove-DbaDbBackupRestoreHistory } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have KeepDays as a parameter" { - $CommandUnderTest | Should -HaveParameter KeepDays -Type Int32 + $CommandUnderTest | Should -HaveParameter KeepDays -Type System.Int32 } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Remove-DbaDbCertificate.Tests.ps1 b/tests/Remove-DbaDbCertificate.Tests.ps1 index 975f69cb0f..019e007652 100644 --- a/tests/Remove-DbaDbCertificate.Tests.ps1 +++ b/tests/Remove-DbaDbCertificate.Tests.ps1 @@ -13,19 +13,19 @@ Describe "Remove-DbaDbCertificate Unit Tests" -Tag 'UnitTests' { } It "Should have SqlInstance parameter" { - $command | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $command | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential parameter" { - $command | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database parameter" { - $command | Should -HaveParameter Database -Type String[] -Mandatory:$false + $command | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have Certificate parameter" { - $command | Should -HaveParameter Certificate -Type String[] -Mandatory:$false + $command | Should -HaveParameter Certificate -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { @@ -33,7 +33,7 @@ Describe "Remove-DbaDbCertificate Unit Tests" -Tag 'UnitTests' { } It "Should have EnableException parameter" { - $command | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $command | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbCheckConstraint.Tests.ps1 b/tests/Remove-DbaDbCheckConstraint.Tests.ps1 index 18c4459cac..15ef5191cf 100644 --- a/tests/Remove-DbaDbCheckConstraint.Tests.ps1 +++ b/tests/Remove-DbaDbCheckConstraint.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Remove-DbaDbCheckConstraint" { $CommandUnderTest = Get-Command Remove-DbaDbCheckConstraint } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have ExcludeSystemTable as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemTable -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemTable -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Check[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Check[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaDbData.Tests.ps1 b/tests/Remove-DbaDbData.Tests.ps1 index 19839efe47..b48decb1b1 100644 --- a/tests/Remove-DbaDbData.Tests.ps1 +++ b/tests/Remove-DbaDbData.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Remove-DbaDbData" { $CommandUnderTest = Get-Command Remove-DbaDbData } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaDbFileGroup.Tests.ps1 b/tests/Remove-DbaDbFileGroup.Tests.ps1 index 6a85d2f2d1..ee9921d207 100644 --- a/tests/Remove-DbaDbFileGroup.Tests.ps1 +++ b/tests/Remove-DbaDbFileGroup.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaDbFileGroup Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Remove-DbaDbFileGroup } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have FileGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter FileGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileGroup -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbLogShipping.Tests.ps1 b/tests/Remove-DbaDbLogShipping.Tests.ps1 index ad130ecda4..ce803682c1 100644 --- a/tests/Remove-DbaDbLogShipping.Tests.ps1 +++ b/tests/Remove-DbaDbLogShipping.Tests.ps1 @@ -8,26 +8,26 @@ Describe "Remove-DbaDbLogShipping Unit Tests" -Tag "UnitTests" { BeforeAll { $CommandUnderTest = Get-Command Remove-DbaDbLogShipping } - It "Should have PrimarySqlInstance as a non-mandatory DbaInstanceParameter" { - $CommandUnderTest | Should -HaveParameter PrimarySqlInstance -Type DbaInstanceParameter -Mandatory:$false + It "Should have PrimarySqlInstance as a non-mandatory Dataplat.Dbatools.Parameter.DbaInstanceParameter" { + $CommandUnderTest | Should -HaveParameter PrimarySqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false } - It "Should have SecondarySqlInstance as a non-mandatory DbaInstanceParameter" { - $CommandUnderTest | Should -HaveParameter SecondarySqlInstance -Type DbaInstanceParameter -Mandatory:$false + It "Should have SecondarySqlInstance as a non-mandatory Dataplat.Dbatools.Parameter.DbaInstanceParameter" { + $CommandUnderTest | Should -HaveParameter SecondarySqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false } - It "Should have PrimarySqlCredential as a non-mandatory PSCredential" { - $CommandUnderTest | Should -HaveParameter PrimarySqlCredential -Type PSCredential -Mandatory:$false + It "Should have PrimarySqlCredential as a non-mandatory System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter PrimarySqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have SecondarySqlCredential as a non-mandatory PSCredential" { - $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type PSCredential -Mandatory:$false + It "Should have SecondarySqlCredential as a non-mandatory System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have Database as a non-mandatory Object[]" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + It "Should have Database as a non-mandatory System.Object[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } - It "Should have RemoveSecondaryDatabase as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter RemoveSecondaryDatabase -Type Switch -Mandatory:$false + It "Should have RemoveSecondaryDatabase as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter RemoveSecondaryDatabase -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbMailAccount.Tests.ps1 b/tests/Remove-DbaDbMailAccount.Tests.ps1 index 37f1a1132b..fe67be5551 100644 --- a/tests/Remove-DbaDbMailAccount.Tests.ps1 +++ b/tests/Remove-DbaDbMailAccount.Tests.ps1 @@ -18,16 +18,16 @@ Describe "Remove-DbaDbMailAccount" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Account as a parameter" { - $CommandUnderTest | Should -HaveParameter Account -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Account -Type System.String[] -Mandatory:$false } It "Should have ExcludeAccount as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeAccount -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeAccount -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type MailAccount[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaDbMailProfile.Tests.ps1 b/tests/Remove-DbaDbMailProfile.Tests.ps1 index 41806fff05..dc03dd8780 100644 --- a/tests/Remove-DbaDbMailProfile.Tests.ps1 +++ b/tests/Remove-DbaDbMailProfile.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Remove-DbaDbMailProfile" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Profile as a parameter" { - $CommandUnderTest | Should -HaveParameter Profile -Type String[] + $CommandUnderTest | Should -HaveParameter Profile -Type System.String[] } It "Should have ExcludeProfile as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeProfile -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeProfile -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type MailProfile[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Mail.MailProfile[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaDbMasterKey.Tests.ps1 b/tests/Remove-DbaDbMasterKey.Tests.ps1 index ce8dc8bda7..33226ad715 100644 --- a/tests/Remove-DbaDbMasterKey.Tests.ps1 +++ b/tests/Remove-DbaDbMasterKey.Tests.ps1 @@ -13,23 +13,23 @@ Describe "Remove-DbaDbMasterKey Unit Tests" -Tag 'UnitTests' { } It "Should have SqlInstance parameter" { - $command | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $command | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential parameter" { - $command | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database parameter" { - $command | Should -HaveParameter Database -Type String[] -Mandatory:$false + $command | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $command | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $command | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have All parameter" { - $command | Should -HaveParameter All -Type Switch -Mandatory:$false + $command | Should -HaveParameter All -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have InputObject parameter" { @@ -37,7 +37,7 @@ Describe "Remove-DbaDbMasterKey Unit Tests" -Tag 'UnitTests' { } It "Should have EnableException parameter" { - $command | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $command | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbMirror.Tests.ps1 b/tests/Remove-DbaDbMirror.Tests.ps1 index 2f40e5f113..4b101810db 100644 --- a/tests/Remove-DbaDbMirror.Tests.ps1 +++ b/tests/Remove-DbaDbMirror.Tests.ps1 @@ -9,26 +9,26 @@ Describe "Remove-DbaDbMirror" { BeforeAll { $CommandUnderTest = Get-Command Remove-DbaDbMirror } - 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 Database as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Database[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -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 } It "Should have WhatIf as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbMirrorMonitor.Tests.ps1 b/tests/Remove-DbaDbMirrorMonitor.Tests.ps1 index 824352d6c6..e4d34a9d4c 100644 --- a/tests/Remove-DbaDbMirrorMonitor.Tests.ps1 +++ b/tests/Remove-DbaDbMirrorMonitor.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Remove-DbaDbMirrorMonitor" { $CommandUnderTest = Get-Command Remove-DbaDbMirrorMonitor } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaDbOrphanUser.Tests.ps1 b/tests/Remove-DbaDbOrphanUser.Tests.ps1 index b04bd21086..f1d7f5685c 100644 --- a/tests/Remove-DbaDbOrphanUser.Tests.ps1 +++ b/tests/Remove-DbaDbOrphanUser.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Remove-DbaDbOrphanUser Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Remove-DbaDbOrphanUser } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have User as a parameter" { - $CommandUnderTest | Should -HaveParameter User -Type Object[] + $CommandUnderTest | Should -HaveParameter User -Type System.Object[] } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Remove-DbaDbPartitionScheme.Tests.ps1 b/tests/Remove-DbaDbPartitionScheme.Tests.ps1 index f94354eba9..482263cec2 100644 --- a/tests/Remove-DbaDbPartitionScheme.Tests.ps1 +++ b/tests/Remove-DbaDbPartitionScheme.Tests.ps1 @@ -9,25 +9,25 @@ Describe "Remove-DbaDbPartitionScheme" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PartitionScheme[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.PartitionScheme[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have WhatIf parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbRole.Tests.ps1 b/tests/Remove-DbaDbRole.Tests.ps1 index dd5cb6c4fd..ffeb155bf4 100644 --- a/tests/Remove-DbaDbRole.Tests.ps1 +++ b/tests/Remove-DbaDbRole.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Remove-DbaDbRole Unit Tests" -Tag "UnitTests" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have Role parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Role -Type System.String[] -Mandatory:$false } It "Should have ExcludeRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeRole -Type System.String[] -Mandatory:$false } It "Should have IncludeSystemDbs parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDbs -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystemDbs -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbRoleMember.Tests.ps1 b/tests/Remove-DbaDbRoleMember.Tests.ps1 index dba1755a4b..b7d68a9daa 100644 --- a/tests/Remove-DbaDbRoleMember.Tests.ps1 +++ b/tests/Remove-DbaDbRoleMember.Tests.ps1 @@ -40,25 +40,25 @@ Describe "Remove-DbaDbRoleMember" { $CommandUnderTest = Get-Command Remove-DbaDbRoleMember } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Role as a parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type String[] + $CommandUnderTest | Should -HaveParameter Role -Type System.String[] } It "Should have User as a parameter" { - $CommandUnderTest | Should -HaveParameter User -Type String[] + $CommandUnderTest | Should -HaveParameter User -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaDbSchema.Tests.ps1 b/tests/Remove-DbaDbSchema.Tests.ps1 index 592249b9fe..c37736c7ce 100644 --- a/tests/Remove-DbaDbSchema.Tests.ps1 +++ b/tests/Remove-DbaDbSchema.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaDbSchema" { $CommandUnderTest = Get-Command Remove-DbaDbSchema } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Schema -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaDbSequence.Tests.ps1 b/tests/Remove-DbaDbSequence.Tests.ps1 index cd11f1a16a..d0a1492c74 100644 --- a/tests/Remove-DbaDbSequence.Tests.ps1 +++ b/tests/Remove-DbaDbSequence.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Remove-DbaDbSequence" { $CommandUnderTest = Get-Command Remove-DbaDbSequence } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have Sequence as a parameter" { - $CommandUnderTest | Should -HaveParameter Sequence -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Sequence -Type System.String[] -Mandatory:$false } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Schema -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Sequence[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Sequence[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } diff --git a/tests/Remove-DbaDbSnapshot.Tests.ps1 b/tests/Remove-DbaDbSnapshot.Tests.ps1 index 5651d422fe..4791846710 100644 --- a/tests/Remove-DbaDbSnapshot.Tests.ps1 +++ b/tests/Remove-DbaDbSnapshot.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Remove-DbaDbSnapshot" { $CommandUnderTest = Get-Command Remove-DbaDbSnapshot } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have Snapshot parameter" { - $CommandUnderTest | Should -HaveParameter Snapshot -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Snapshot -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have AllSnapshots parameter" { - $CommandUnderTest | Should -HaveParameter AllSnapshots -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllSnapshots -Type System.Management.Automation.Switch -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 } } diff --git a/tests/Remove-DbaDbSynonym.Tests.ps1 b/tests/Remove-DbaDbSynonym.Tests.ps1 index 70d3643715..1ab797c26d 100644 --- a/tests/Remove-DbaDbSynonym.Tests.ps1 +++ b/tests/Remove-DbaDbSynonym.Tests.ps1 @@ -22,34 +22,34 @@ Describe "Remove-DbaDbSynonym" { $CommandUnderTest = Get-Command Remove-DbaDbSynonym } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String[] + $CommandUnderTest | Should -HaveParameter Schema -Type System.String[] } It "Should have ExcludeSchema as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSchema -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeSchema -Type System.String[] } It "Should have Synonym as a parameter" { - $CommandUnderTest | Should -HaveParameter Synonym -Type String[] + $CommandUnderTest | Should -HaveParameter Synonym -Type System.String[] } It "Should have ExcludeSynonym as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSynonym -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeSynonym -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaDbTable.Tests.ps1 b/tests/Remove-DbaDbTable.Tests.ps1 index 692a88f3f1..c0f341274b 100644 --- a/tests/Remove-DbaDbTable.Tests.ps1 +++ b/tests/Remove-DbaDbTable.Tests.ps1 @@ -8,20 +8,20 @@ Describe "Remove-DbaDbTable" { It "Should have SqlInstance as a non-mandatory parameter of type DbaInstanceParameter[]" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type 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 Database as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } - It "Should have Table as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + It "Should have Table as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] -Mandatory:$false } It "Should have InputObject as a non-mandatory parameter of type [Microsoft.SqlServer.Management.Smo.Table[]]" { $CommandUnderTest | Should -HaveParameter InputObject -Type [Microsoft.SqlServer.Management.Smo.Table[]] -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 } } diff --git a/tests/Remove-DbaDbTableData.Tests.ps1 b/tests/Remove-DbaDbTableData.Tests.ps1 index 334db64aad..ee9c8bf724 100644 --- a/tests/Remove-DbaDbTableData.Tests.ps1 +++ b/tests/Remove-DbaDbTableData.Tests.ps1 @@ -57,37 +57,37 @@ Describe "Remove-DbaDbTableData" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a PSCredential parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.PSCredential -Mandatory:$false } It "Should have Database as a String[] parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have BatchSize as an Int32 parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 -Mandatory:$false } It "Should have Table as a String parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter Table -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -Type System.String -Mandatory:$false } It "Should have DeleteSql as a String parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter DeleteSql -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DeleteSql -Type System.String -Mandatory:$false } It "Should have LogBackupPath as a String parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter LogBackupPath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogBackupPath -Type System.String -Mandatory:$false } It "Should have LogBackupTimeStampFormat as a String parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter LogBackupTimeStampFormat -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogBackupTimeStampFormat -Type System.String -Mandatory:$false } It "Should have AzureBaseUrl as a String[] parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter AzureBaseUrl -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AzureBaseUrl -Type System.String[] -Mandatory:$false } It "Should have AzureCredential as a String parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter AzureCredential -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AzureCredential -Type System.String -Mandatory:$false } It "Should have InputObject as an Object[] parameter that is not mandatory" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException as a Switch that is not mandatory" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } diff --git a/tests/Remove-DbaDbUdf.Tests.ps1 b/tests/Remove-DbaDbUdf.Tests.ps1 index 30887621cf..b2c058eaed 100644 --- a/tests/Remove-DbaDbUdf.Tests.ps1 +++ b/tests/Remove-DbaDbUdf.Tests.ps1 @@ -18,7 +18,7 @@ Describe "Remove-DbaDbUdf" { $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false } It "Should have ExcludeSystemUdf as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemUdf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemUdf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Schema as a non-mandatory parameter of type String[]" { $CommandUnderTest | Should -HaveParameter Schema -Type String[] -Mandatory:$false @@ -33,10 +33,10 @@ Describe "Remove-DbaDbUdf" { $CommandUnderTest | Should -HaveParameter ExcludeName -Type String[] -Mandatory:$false } It "Should have InputObject as a non-mandatory parameter of type UserDefinedFunction[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type UserDefinedFunction[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.UserDefinedFunction[] -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 } } diff --git a/tests/Remove-DbaDbUser.Tests.ps1 b/tests/Remove-DbaDbUser.Tests.ps1 index 478cb9fe20..5f08ee04e1 100644 --- a/tests/Remove-DbaDbUser.Tests.ps1 +++ b/tests/Remove-DbaDbUser.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Remove-DbaDbUser Unit Tests" -Tag 'UnitTests' { $command = Get-Command -Name $CommandName } It "Should have SqlInstance parameter" { - $command | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $command | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential parameter" { - $command | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database parameter" { - $command | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $command | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $command | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $command | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have User parameter" { - $command | Should -HaveParameter User -Type Object[] -Mandatory:$false + $command | Should -HaveParameter User -Type System.Object[] -Mandatory:$false } It "Should have InputObject parameter" { - $command | Should -HaveParameter InputObject -Type User[] -Mandatory:$false + $command | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.SMO.User[] -Mandatory:$false } It "Should have Force parameter" { - $command | Should -HaveParameter Force -Type Switch -Mandatory:$false + $command | Should -HaveParameter Force -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have EnableException parameter" { - $command | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $command | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Remove-DbaDbView.Tests.ps1 b/tests/Remove-DbaDbView.Tests.ps1 index e696429ee7..3c95a701f6 100644 --- a/tests/Remove-DbaDbView.Tests.ps1 +++ b/tests/Remove-DbaDbView.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Remove-DbaDbView" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have View as a parameter" { - $CommandUnderTest | Should -HaveParameter View -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter View -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type View[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.View[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaEndpoint.Tests.ps1 b/tests/Remove-DbaEndpoint.Tests.ps1 index b0182a3615..c3c248603f 100644 --- a/tests/Remove-DbaEndpoint.Tests.ps1 +++ b/tests/Remove-DbaEndpoint.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Remove-DbaEndpoint" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Endpoint as a parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String[] + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String[] } It "Should have AllEndpoints as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllEndpoints -Type Switch + $CommandUnderTest | Should -HaveParameter AllEndpoints -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Endpoint[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Endpoint[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaExtendedProperty.Tests.ps1 b/tests/Remove-DbaExtendedProperty.Tests.ps1 index 12b3fc1a44..b5745ed6bd 100644 --- a/tests/Remove-DbaExtendedProperty.Tests.ps1 +++ b/tests/Remove-DbaExtendedProperty.Tests.ps1 @@ -9,28 +9,28 @@ Describe "Remove-DbaExtendedProperty" { $CommandUnderTest | Should -HaveParameter InputObject -Type ExtendedProperty[] } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Accepts WarningVariable as a parameter" { - $CommandUnderTest | Should -HaveParameter WarningVariable -Type String + $CommandUnderTest | Should -HaveParameter WarningVariable -Type System.String } It "Accepts InformationVariable as a parameter" { - $CommandUnderTest | Should -HaveParameter InformationVariable -Type String + $CommandUnderTest | Should -HaveParameter InformationVariable -Type System.String } It "Accepts OutVariable as a parameter" { - $CommandUnderTest | Should -HaveParameter OutVariable -Type String + $CommandUnderTest | Should -HaveParameter OutVariable -Type System.String } It "Accepts OutBuffer as a parameter" { - $CommandUnderTest | Should -HaveParameter OutBuffer -Type Int32 + $CommandUnderTest | Should -HaveParameter OutBuffer -Type System.Int32 } It "Accepts PipelineVariable as a parameter" { - $CommandUnderTest | Should -HaveParameter PipelineVariable -Type String + $CommandUnderTest | Should -HaveParameter PipelineVariable -Type System.String } It "Accepts WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Accepts Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaFirewallRule.Tests.ps1 b/tests/Remove-DbaFirewallRule.Tests.ps1 index 9e4d832f68..19836fe138 100644 --- a/tests/Remove-DbaFirewallRule.Tests.ps1 +++ b/tests/Remove-DbaFirewallRule.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Remove-DbaFirewallRule" { $CommandUnderTest = Get-Command Remove-DbaFirewallRule } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Remove-DbaLinkedServer.Tests.ps1 b/tests/Remove-DbaLinkedServer.Tests.ps1 index 839af7d3da..d5052bce8f 100644 --- a/tests/Remove-DbaLinkedServer.Tests.ps1 +++ b/tests/Remove-DbaLinkedServer.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaLinkedServer" { $CommandUnderTest = Get-Command Remove-DbaLinkedServer } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have LinkedServer as a parameter" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type String[] + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have Force as a parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaLinkedServerLogin.Tests.ps1 b/tests/Remove-DbaLinkedServerLogin.Tests.ps1 index ff87c82729..88478f46a9 100644 --- a/tests/Remove-DbaLinkedServerLogin.Tests.ps1 +++ b/tests/Remove-DbaLinkedServerLogin.Tests.ps1 @@ -52,19 +52,19 @@ Describe "Remove-DbaLinkedServerLogin" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have LinkedServer as a parameter" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.String[] -Mandatory:$false } It "Should have LocalLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalLogin -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LocalLogin -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaLogin.Tests.ps1 b/tests/Remove-DbaLogin.Tests.ps1 index 9536520014..7dd2dfcccb 100644 --- a/tests/Remove-DbaLogin.Tests.ps1 +++ b/tests/Remove-DbaLogin.Tests.ps1 @@ -15,19 +15,19 @@ Describe "Remove-DbaLogin" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Login[] -Mandatory:$false } It "Should have Force as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaNetworkCertificate.Tests.ps1 b/tests/Remove-DbaNetworkCertificate.Tests.ps1 index ed407e8f13..fb71c457dd 100644 --- a/tests/Remove-DbaNetworkCertificate.Tests.ps1 +++ b/tests/Remove-DbaNetworkCertificate.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Remove-DbaNetworkCertificate" { $CommandUnderTest = Get-Command Remove-DbaNetworkCertificate } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaPfDataCollectorCounter.Tests.ps1 b/tests/Remove-DbaPfDataCollectorCounter.Tests.ps1 index ac40008f7e..4038518364 100644 --- a/tests/Remove-DbaPfDataCollectorCounter.Tests.ps1 +++ b/tests/Remove-DbaPfDataCollectorCounter.Tests.ps1 @@ -5,25 +5,25 @@ Describe "Remove-DbaPfDataCollectorCounter" { $CommandUnderTest = Get-Command Remove-DbaPfDataCollectorCounter } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have CollectorSet as a parameter" { - $CommandUnderTest | Should -HaveParameter CollectorSet -Type String[] + $CommandUnderTest | Should -HaveParameter CollectorSet -Type System.String[] } It "Should have Collector as a parameter" { - $CommandUnderTest | Should -HaveParameter Collector -Type String[] + $CommandUnderTest | Should -HaveParameter Collector -Type System.String[] } It "Should have Counter as a parameter" { - $CommandUnderTest | Should -HaveParameter Counter -Type Object[] + $CommandUnderTest | Should -HaveParameter Counter -Type System.Object[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Remove-DbaRegServer.Tests.ps1 b/tests/Remove-DbaRegServer.Tests.ps1 index 4d8b8bd308..6748b77806 100644 --- a/tests/Remove-DbaRegServer.Tests.ps1 +++ b/tests/Remove-DbaRegServer.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Remove-DbaRegServer" { $CommandUnderTest = Get-Command Remove-DbaRegServer } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have ServerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerName -Type String[] + $CommandUnderTest | Should -HaveParameter ServerName -Type System.String[] } It "Should have Group as a parameter" { - $CommandUnderTest | Should -HaveParameter Group -Type String[] + $CommandUnderTest | Should -HaveParameter Group -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaRegServerGroup.Tests.ps1 b/tests/Remove-DbaRegServerGroup.Tests.ps1 index 8493c40cc2..e9c313cc09 100644 --- a/tests/Remove-DbaRegServerGroup.Tests.ps1 +++ b/tests/Remove-DbaRegServerGroup.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Remove-DbaRegServerGroup" { $CommandUnderTest = Get-Command Remove-DbaRegServerGroup } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -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 } } diff --git a/tests/Remove-DbaReplSubscription.Tests.ps1 b/tests/Remove-DbaReplSubscription.Tests.ps1 index 29522cb138..99eebc40eb 100644 --- a/tests/Remove-DbaReplSubscription.Tests.ps1 +++ b/tests/Remove-DbaReplSubscription.Tests.ps1 @@ -11,34 +11,34 @@ Describe "Remove-DbaReplSubscription" { $CommandUnderTest = Get-Command Remove-DbaReplSubscription } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have PublicationName parameter" { - $CommandUnderTest | Should -HaveParameter PublicationName -Type String + $CommandUnderTest | Should -HaveParameter PublicationName -Type System.String } It "Should have SubscriberSqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SubscriberSqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SubscriberSqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SubscriberSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SubscriberSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SubscriberSqlCredential -Type System.Management.Automation.PSCredential } It "Should have SubscriptionDatabase parameter" { - $CommandUnderTest | Should -HaveParameter SubscriptionDatabase -Type String + $CommandUnderTest | Should -HaveParameter SubscriptionDatabase -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have WhatIf parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Should have Confirm parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Remove-DbaRgResourcePool.Tests.ps1 b/tests/Remove-DbaRgResourcePool.Tests.ps1 index c85451d410..a138b432f0 100644 --- a/tests/Remove-DbaRgResourcePool.Tests.ps1 +++ b/tests/Remove-DbaRgResourcePool.Tests.ps1 @@ -16,19 +16,19 @@ Describe "Remove-DbaRgResourcePool" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have ResourcePool parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePool -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResourcePool -Type System.String[] -Mandatory:$false } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false } It "Should have SkipReconfigure parameter" { - $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Remove-DbaRgWorkloadGroup.Tests.ps1 b/tests/Remove-DbaRgWorkloadGroup.Tests.ps1 index c56d4b9435..3e5da10742 100644 --- a/tests/Remove-DbaRgWorkloadGroup.Tests.ps1 +++ b/tests/Remove-DbaRgWorkloadGroup.Tests.ps1 @@ -10,28 +10,28 @@ Describe "Remove-DbaRgWorkloadGroup" { $CommandUnderTest = Get-Command Remove-DbaRgWorkloadGroup } 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 WorkloadGroup parameter" { - $CommandUnderTest | Should -HaveParameter WorkloadGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WorkloadGroup -Type System.String[] -Mandatory:$false } It "Should have ResourcePool parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePool -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResourcePool -Type System.String -Mandatory:$false } It "Should have ResourcePoolType parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePoolType -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResourcePoolType -Type System.String -Mandatory:$false } It "Should have SkipReconfigure parameter" { - $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type WorkloadGroup[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.WorkloadGroup[] -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 } } diff --git a/tests/Remove-DbaServerRole.Tests.ps1 b/tests/Remove-DbaServerRole.Tests.ps1 index d8c6269811..ea92895a79 100644 --- a/tests/Remove-DbaServerRole.Tests.ps1 +++ b/tests/Remove-DbaServerRole.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Remove-DbaServerRole Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have ServerRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ServerRole -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type ServerRole[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.ServerRole[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Remove-DbaServerRoleMember.Tests.ps1 b/tests/Remove-DbaServerRoleMember.Tests.ps1 index 0c8773cb4a..f74739ef02 100644 --- a/tests/Remove-DbaServerRoleMember.Tests.ps1 +++ b/tests/Remove-DbaServerRoleMember.Tests.ps1 @@ -27,25 +27,25 @@ Describe "Remove-DbaServerRoleMember" { $CommandUnderTest = Get-Command Remove-DbaServerRoleMember } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have ServerRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerRole -Type String[] + $CommandUnderTest | Should -HaveParameter ServerRole -Type System.String[] } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have Role as a parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type String[] + $CommandUnderTest | Should -HaveParameter Role -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaSpn.Tests.ps1 b/tests/Remove-DbaSpn.Tests.ps1 index 9df19036dc..ffe1856b3a 100644 --- a/tests/Remove-DbaSpn.Tests.ps1 +++ b/tests/Remove-DbaSpn.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Remove-DbaSpn" { $CommandUnderTest = Get-Command Remove-DbaSpn } It "Accepts SPN as a parameter" { - $CommandUnderTest | Should -HaveParameter SPN -Type String + $CommandUnderTest | Should -HaveParameter SPN -Type System.String } It "Accepts ServiceAccount as a parameter" { - $CommandUnderTest | Should -HaveParameter ServiceAccount -Type String + $CommandUnderTest | Should -HaveParameter ServiceAccount -Type System.String } It "Accepts Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Accepts WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Accepts Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaTrace.Tests.ps1 b/tests/Remove-DbaTrace.Tests.ps1 index 14572c59d8..f70dd34532 100644 --- a/tests/Remove-DbaTrace.Tests.ps1 +++ b/tests/Remove-DbaTrace.Tests.ps1 @@ -5,19 +5,19 @@ Describe "Remove-DbaTrace" { $CommandUnderTest = Get-Command Remove-DbaTrace } It "Accepts SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Accepts SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Accepts Id as a parameter" { - $CommandUnderTest | Should -HaveParameter Id -Type Int32[] + $CommandUnderTest | Should -HaveParameter Id -Type System.Int32[] } It "Accepts InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Remove-DbaXESession.Tests.ps1 b/tests/Remove-DbaXESession.Tests.ps1 index 9b33c1b66e..4e27284c86 100644 --- a/tests/Remove-DbaXESession.Tests.ps1 +++ b/tests/Remove-DbaXESession.Tests.ps1 @@ -9,10 +9,10 @@ Describe "Remove-DbaXESession" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Session as a parameter" { - $CommandUnderTest | Should -HaveParameter Session -Type Object[] + $CommandUnderTest | Should -HaveParameter Session -Type System.Object[] } It "Should have AllSessions as a switch parameter" { $CommandUnderTest | Should -HaveParameter AllSessions -Type switch diff --git a/tests/Remove-DbaXESmartTarget.Tests.ps1 b/tests/Remove-DbaXESmartTarget.Tests.ps1 index 56fc36f688..6a3f1d9ef1 100644 --- a/tests/Remove-DbaXESmartTarget.Tests.ps1 +++ b/tests/Remove-DbaXESmartTarget.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Remove-DbaXESmartTarget" { $CommandUnderTest = Get-Command Remove-DbaXESmartTarget } It "Accepts InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Accepts WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Accepts Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Rename-DbaDatabase.Tests.ps1 b/tests/Rename-DbaDatabase.Tests.ps1 index 33b29e250b..56ce86bec9 100644 --- a/tests/Rename-DbaDatabase.Tests.ps1 +++ b/tests/Rename-DbaDatabase.Tests.ps1 @@ -27,52 +27,52 @@ Describe "Rename-DbaDatabase" { $CommandUnderTest = Get-Command Rename-DbaDatabase } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have AllDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter AllDatabases -Type System.Management.Automation.SwitchParameter } It "Should have DatabaseName as a parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseName -Type String + $CommandUnderTest | Should -HaveParameter DatabaseName -Type System.String } It "Should have FileGroupName as a parameter" { - $CommandUnderTest | Should -HaveParameter FileGroupName -Type String + $CommandUnderTest | Should -HaveParameter FileGroupName -Type System.String } It "Should have LogicalName as a parameter" { - $CommandUnderTest | Should -HaveParameter LogicalName -Type String + $CommandUnderTest | Should -HaveParameter LogicalName -Type System.String } It "Should have FileName as a parameter" { - $CommandUnderTest | Should -HaveParameter FileName -Type String + $CommandUnderTest | Should -HaveParameter FileName -Type System.String } It "Should have ReplaceBefore as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ReplaceBefore -Type Switch + $CommandUnderTest | Should -HaveParameter ReplaceBefore -Type System.Management.Automation.SwitchParameter } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have Move as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Move -Type Switch + $CommandUnderTest | Should -HaveParameter Move -Type System.Management.Automation.SwitchParameter } It "Should have SetOffline as a switch parameter" { - $CommandUnderTest | Should -HaveParameter SetOffline -Type Switch + $CommandUnderTest | Should -HaveParameter SetOffline -Type System.Management.Automation.SwitchParameter } It "Should have Preview as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Preview -Type Switch + $CommandUnderTest | Should -HaveParameter Preview -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Rename-DbaLogin.Tests.ps1 b/tests/Rename-DbaLogin.Tests.ps1 index 2c056c45f6..cb53e36b43 100644 --- a/tests/Rename-DbaLogin.Tests.ps1 +++ b/tests/Rename-DbaLogin.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Rename-DbaLogin" { $CommandUnderTest = Get-Command Rename-DbaLogin } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String + $CommandUnderTest | Should -HaveParameter Login -Type System.String } It "Should have NewLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter NewLogin -Type String + $CommandUnderTest | Should -HaveParameter NewLogin -Type System.String } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Repair-DbaDbMirror.Tests.ps1 b/tests/Repair-DbaDbMirror.Tests.ps1 index c53617a4e0..4e68cc4243 100644 --- a/tests/Repair-DbaDbMirror.Tests.ps1 +++ b/tests/Repair-DbaDbMirror.Tests.ps1 @@ -9,26 +9,26 @@ Describe "Repair-DbaDbMirror" { BeforeAll { $CommandUnderTest = Get-Command Repair-DbaDbMirror } - 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 Microsoft.SqlServer.Management.Smo.PSCredential" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.PSCredential -Mandatory:$false } - It "Should have Database as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Database[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -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.Switch -Mandatory:$false } It "Should have WhatIf as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have Confirm as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.Switch -Mandatory:$false } } diff --git a/tests/Repair-DbaDbOrphanUser.Tests.ps1 b/tests/Repair-DbaDbOrphanUser.Tests.ps1 index 673bd6c0b9..3f019530e8 100644 --- a/tests/Repair-DbaDbOrphanUser.Tests.ps1 +++ b/tests/Repair-DbaDbOrphanUser.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Repair-DbaDbOrphanUser" { $CommandUnderTest = Get-Command Repair-DbaDbOrphanUser } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have Users parameter" { - $CommandUnderTest | Should -HaveParameter Users -Type Object[] + $CommandUnderTest | Should -HaveParameter Users -Type System.Object[] } It "Should have RemoveNotExisting parameter" { - $CommandUnderTest | Should -HaveParameter RemoveNotExisting -Type Switch + $CommandUnderTest | Should -HaveParameter RemoveNotExisting -Type System.Management.Automation.Switch } It "Should have Force parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.Switch } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Repair-DbaInstanceName.Tests.ps1 b/tests/Repair-DbaInstanceName.Tests.ps1 index ad6e75660e..1a063d254c 100644 --- a/tests/Repair-DbaInstanceName.Tests.ps1 +++ b/tests/Repair-DbaInstanceName.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Repair-DbaInstanceName" { $CommandUnderTest = Get-Command Repair-DbaInstanceName } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have AutoFix parameter" { - $CommandUnderTest | Should -HaveParameter AutoFix -Type Switch + $CommandUnderTest | Should -HaveParameter AutoFix -Type System.Management.Automation.SwitchParameter } 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 } } } diff --git a/tests/Reset-DbaAdmin.Tests.ps1 b/tests/Reset-DbaAdmin.Tests.ps1 index bb833b404b..81e41217c0 100644 --- a/tests/Reset-DbaAdmin.Tests.ps1 +++ b/tests/Reset-DbaAdmin.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Reset-DbaAdmin" { $CommandUnderTest = Get-Command Reset-DbaAdmin } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String + $CommandUnderTest | Should -HaveParameter Login -Type System.String } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have Force as a parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Reset-DbatoolsConfig.Tests.ps1 b/tests/Reset-DbatoolsConfig.Tests.ps1 index 8ed6cdf11d..604b548e8b 100644 --- a/tests/Reset-DbatoolsConfig.Tests.ps1 +++ b/tests/Reset-DbatoolsConfig.Tests.ps1 @@ -14,23 +14,23 @@ Describe "Reset-DbatoolsConfig" { It "Should have ConfigurationItem as a non-mandatory parameter of type Dataplat.Dbatools.Configuration.Config[]" { $CommandUnderTest | Should -HaveParameter ConfigurationItem -Type Dataplat.Dbatools.Configuration.Config[] -Mandatory:$false } - It "Should have FullName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter FullName -Type String[] -Mandatory:$false + It "Should have FullName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter FullName -Type System.String[] -Mandatory:$false } - It "Should have Module as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Module -Type String -Mandatory:$false + It "Should have Module as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Module -Type System.String -Mandatory:$false } - It "Should have Name as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + It "Should have Name as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Name -Type System.String -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 } It "Should have WhatIf as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Confirm as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Resolve-DbaNetworkName.Tests.ps1 b/tests/Resolve-DbaNetworkName.Tests.ps1 index 0c194c9298..e82d182723 100644 --- a/tests/Resolve-DbaNetworkName.Tests.ps1 +++ b/tests/Resolve-DbaNetworkName.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Resolve-DbaNetworkName Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Resolve-DbaNetworkName } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Turbo as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Turbo -Type switch + $CommandUnderTest | Should -HaveParameter Turbo -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Resolve-DbaPath.Tests.ps1 b/tests/Resolve-DbaPath.Tests.ps1 index 89681fee03..5e9e8dad91 100644 --- a/tests/Resolve-DbaPath.Tests.ps1 +++ b/tests/Resolve-DbaPath.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Resolve-DbaPath Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Resolve-DbaPath } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.String[] -Mandatory:$false } It "Should have Provider as a parameter" { - $CommandUnderTest | Should -HaveParameter Provider -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Provider -Type System.String -Mandatory:$false } It "Should have SingleItem as a parameter" { - $CommandUnderTest | Should -HaveParameter SingleItem -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SingleItem -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NewChild as a parameter" { - $CommandUnderTest | Should -HaveParameter NewChild -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NewChild -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Restart-DbaService.Tests.ps1 b/tests/Restart-DbaService.Tests.ps1 index 1d7619949c..d77a64e299 100644 --- a/tests/Restart-DbaService.Tests.ps1 +++ b/tests/Restart-DbaService.Tests.ps1 @@ -12,29 +12,29 @@ Describe "Restart-DbaService" { It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false } - It "Should have InstanceName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter InstanceName -Type String[] -Mandatory:$false + It "Should have InstanceName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter InstanceName -Type System.String[] -Mandatory:$false } It "Should have SqlInstance as a non-mandatory parameter of type DbaInstanceParameter[]" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } - It "Should have Type as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] -Mandatory:$false + It "Should have Type as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } - It "Should have Timeout as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Timeout -Type Int32 -Mandatory:$false + It "Should have Timeout as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Timeout -Type System.Int32 -Mandatory:$false } It "Should have Credential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false } It "Should have Force as a non-mandatory Switch" { - $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" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Restore-DbaDbCertificate.Tests.ps1 b/tests/Restore-DbaDbCertificate.Tests.ps1 index ffe99654bf..b84afc2778 100644 --- a/tests/Restore-DbaDbCertificate.Tests.ps1 +++ b/tests/Restore-DbaDbCertificate.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Restore-DbaDbCertificate" { $CommandUnderTest = Get-Command Restore-DbaDbCertificate } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String[] + $CommandUnderTest | Should -HaveParameter Path -Type System.String[] } It "Should have KeyFilePath parameter" { - $CommandUnderTest | Should -HaveParameter KeyFilePath -Type String[] + $CommandUnderTest | Should -HaveParameter KeyFilePath -Type System.String[] } It "Should have EncryptionPassword parameter" { - $CommandUnderTest | Should -HaveParameter EncryptionPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter EncryptionPassword -Type System.Security.SecureString } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have Name parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have DecryptionPassword parameter" { - $CommandUnderTest | Should -HaveParameter DecryptionPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter DecryptionPassword -Type System.Security.SecureString } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Restore-DbaDbSnapshot.Tests.ps1 b/tests/Restore-DbaDbSnapshot.Tests.ps1 index 94e5746a11..7b6e653d80 100644 --- a/tests/Restore-DbaDbSnapshot.Tests.ps1 +++ b/tests/Restore-DbaDbSnapshot.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Restore-DbaDbSnapshot Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Restore-DbaDbSnapshot } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have Snapshot as a parameter" { - $CommandUnderTest | Should -HaveParameter Snapshot -Type Object[] + $CommandUnderTest | Should -HaveParameter Snapshot -Type System.Object[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] diff --git a/tests/Resume-DbaAgDbDataMovement.Tests.ps1 b/tests/Resume-DbaAgDbDataMovement.Tests.ps1 index 6b489ceeb1..e50ca57e09 100644 --- a/tests/Resume-DbaAgDbDataMovement.Tests.ps1 +++ b/tests/Resume-DbaAgDbDataMovement.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Resume-DbaAgDbDataMovement" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have AvailabilityGroup parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Save-DbaCommunitySoftware.Tests.ps1 b/tests/Save-DbaCommunitySoftware.Tests.ps1 index 253a13f060..b0e60fcc6c 100644 --- a/tests/Save-DbaCommunitySoftware.Tests.ps1 +++ b/tests/Save-DbaCommunitySoftware.Tests.ps1 @@ -11,23 +11,23 @@ Describe "Save-DbaCommunitySoftware" { BeforeAll { $CommandUnderTest = Get-Command Save-DbaCommunitySoftware } - It "Should have Software as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Software -Type String -Mandatory:$false + It "Should have Software as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Software -Type System.String -Mandatory:$false } - It "Should have Branch as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Branch -Type String -Mandatory:$false + It "Should have Branch as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Branch -Type System.String -Mandatory:$false } - It "Should have LocalFile as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String -Mandatory:$false + It "Should have LocalFile as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter LocalFile -Type System.String -Mandatory:$false } - It "Should have Url as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Url -Type String -Mandatory:$false + It "Should have Url as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Url -Type System.String -Mandatory:$false } - It "Should have LocalDirectory as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter LocalDirectory -Type String -Mandatory:$false + It "Should have LocalDirectory as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter LocalDirectory -Type System.String -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Save-DbaDiagnosticQueryScript.Tests.ps1 b/tests/Save-DbaDiagnosticQueryScript.Tests.ps1 index 3e24dc34b5..29231a9612 100644 --- a/tests/Save-DbaDiagnosticQueryScript.Tests.ps1 +++ b/tests/Save-DbaDiagnosticQueryScript.Tests.ps1 @@ -12,10 +12,10 @@ Describe "Save-DbaDiagnosticQueryScript" { $CommandUnderTest = Get-Command Save-DbaDiagnosticQueryScript } It "Should have Path as a non-mandatory parameter of type FileInfo" { - $CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type Microsoft.SqlServer.Management.Smo.FileInfo -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 } } diff --git a/tests/Save-DbaKbUpdate.Tests.ps1 b/tests/Save-DbaKbUpdate.Tests.ps1 index 1cf3ef5315..efcb7043aa 100644 --- a/tests/Save-DbaKbUpdate.Tests.ps1 +++ b/tests/Save-DbaKbUpdate.Tests.ps1 @@ -10,26 +10,26 @@ Describe "Save-DbaKbUpdate" { BeforeAll { $CommandUnderTest = Get-Command Save-DbaKbUpdate } - It "Should have Name as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] -Mandatory:$false + It "Should have Name as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] -Mandatory:$false } - It "Should have Path as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } - It "Should have FilePath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + It "Should have FilePath as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } - It "Should have Architecture as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Architecture -Type String -Mandatory:$false + It "Should have Architecture as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Architecture -Type System.String -Mandatory:$false } - It "Should have Language as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Language -Type String -Mandatory:$false + It "Should have Language as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Language -Type System.String -Mandatory:$false } - It "Should have InputObject as a non-mandatory Object[] parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + It "Should have InputObject as a non-mandatory System.Object[] parameter" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Select-DbaBackupInformation.Tests.ps1 b/tests/Select-DbaBackupInformation.Tests.ps1 index 3b9de8cc25..b8e719b4ab 100644 --- a/tests/Select-DbaBackupInformation.Tests.ps1 +++ b/tests/Select-DbaBackupInformation.Tests.ps1 @@ -11,32 +11,32 @@ Describe "Select-DbaBackupInformation" { BeforeAll { $CommandUnderTest = Get-Command Select-DbaBackupInformation } - It "Should have BackupHistory as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter BackupHistory -Type Object -Mandatory:$false + It "Should have BackupHistory as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter BackupHistory -Type System.Object[] -Mandatory:$false } - It "Should have RestoreTime as a non-mandatory parameter of type DateTime" { - $CommandUnderTest | Should -HaveParameter RestoreTime -Type DateTime -Mandatory:$false + It "Should have RestoreTime as a non-mandatory parameter of type System.DateTime" { + $CommandUnderTest | Should -HaveParameter RestoreTime -Type System.DateTime -Mandatory:$false } It "Should have IgnoreLogs as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreLogs -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreLogs -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IgnoreDiffs as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreDiffs -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreDiffs -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have DatabaseName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter DatabaseName -Type String[] -Mandatory:$false + It "Should have DatabaseName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter DatabaseName -Type System.String[] -Mandatory:$false } - It "Should have ServerName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ServerName -Type String[] -Mandatory:$false + It "Should have ServerName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ServerName -Type System.String[] -Mandatory:$false } - It "Should have ContinuePoints as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter ContinuePoints -Type Object -Mandatory:$false + It "Should have ContinuePoints as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ContinuePoints -Type System.Object[] -Mandatory:$false } - It "Should have LastRestoreType as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter LastRestoreType -Type Object -Mandatory:$false + It "Should have LastRestoreType as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter LastRestoreType -Type System.Object[] -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 } } diff --git a/tests/Select-DbaDbSequenceNextValue.Tests.ps1 b/tests/Select-DbaDbSequenceNextValue.Tests.ps1 index 421de30f41..ece6cfb706 100644 --- a/tests/Select-DbaDbSequenceNextValue.Tests.ps1 +++ b/tests/Select-DbaDbSequenceNextValue.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Select-DbaDbSequenceNextValue" { $CommandUnderTest = Get-Command Select-DbaDbSequenceNextValue } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have Sequence as a parameter" { - $CommandUnderTest | Should -HaveParameter Sequence -Type String[] + $CommandUnderTest | Should -HaveParameter Sequence -Type System.String[] } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Select-DbaObject.Tests.ps1 b/tests/Select-DbaObject.Tests.ps1 index aa46fff4dc..2846df8719 100644 --- a/tests/Select-DbaObject.Tests.ps1 +++ b/tests/Select-DbaObject.Tests.ps1 @@ -31,58 +31,58 @@ Describe "Select-DbaObject" { $CommandUnderTest = Get-Command Select-DbaObject } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject } It "Should have Property as a parameter" { - $CommandUnderTest | Should -HaveParameter Property -Type DbaSelectParameter[] + $CommandUnderTest | Should -HaveParameter Property -Type Dataplat.Dbatools.Parameter.DbaSelectParameter[] } It "Should have ExcludeProperty as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeProperty -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeProperty -Type System.String[] } It "Should have ExpandProperty as a parameter" { - $CommandUnderTest | Should -HaveParameter ExpandProperty -Type String + $CommandUnderTest | Should -HaveParameter ExpandProperty -Type System.String } It "Should have Alias as a parameter" { - $CommandUnderTest | Should -HaveParameter Alias -Type SelectAliasParameter[] + $CommandUnderTest | Should -HaveParameter Alias -Type Dataplat.Dbatools.Parameter.SelectAliasParameter[] } It "Should have ScriptProperty as a parameter" { - $CommandUnderTest | Should -HaveParameter ScriptProperty -Type SelectScriptPropertyParameter[] + $CommandUnderTest | Should -HaveParameter ScriptProperty -Type Dataplat.Dbatools.Parameter.SelectScriptPropertyParameter[] } It "Should have ScriptMethod as a parameter" { - $CommandUnderTest | Should -HaveParameter ScriptMethod -Type SelectScriptMethodParameter[] + $CommandUnderTest | Should -HaveParameter ScriptMethod -Type Dataplat.Dbatools.Parameter.SelectScriptMethodParameter[] } It "Should have Unique as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Unique -Type Switch + $CommandUnderTest | Should -HaveParameter Unique -Type System.Management.Automation.SwitchParameter } It "Should have Last as a parameter" { - $CommandUnderTest | Should -HaveParameter Last -Type Int32 + $CommandUnderTest | Should -HaveParameter Last -Type System.Int32 } It "Should have First as a parameter" { - $CommandUnderTest | Should -HaveParameter First -Type Int32 + $CommandUnderTest | Should -HaveParameter First -Type System.Int32 } It "Should have Skip as a parameter" { - $CommandUnderTest | Should -HaveParameter Skip -Type Int32 + $CommandUnderTest | Should -HaveParameter Skip -Type System.Int32 } It "Should have SkipLast as a parameter" { - $CommandUnderTest | Should -HaveParameter SkipLast -Type Int32 + $CommandUnderTest | Should -HaveParameter SkipLast -Type System.Int32 } It "Should have Wait as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Wait -Type Switch + $CommandUnderTest | Should -HaveParameter Wait -Type System.Management.Automation.SwitchParameter } It "Should have Index as a parameter" { - $CommandUnderTest | Should -HaveParameter Index -Type Int32[] + $CommandUnderTest | Should -HaveParameter Index -Type System.Int32[] } It "Should have ShowProperty as a parameter" { - $CommandUnderTest | Should -HaveParameter ShowProperty -Type String[] + $CommandUnderTest | Should -HaveParameter ShowProperty -Type System.String[] } It "Should have ShowExcludeProperty as a parameter" { - $CommandUnderTest | Should -HaveParameter ShowExcludeProperty -Type String[] + $CommandUnderTest | Should -HaveParameter ShowExcludeProperty -Type System.String[] } It "Should have TypeName as a parameter" { - $CommandUnderTest | Should -HaveParameter TypeName -Type String + $CommandUnderTest | Should -HaveParameter TypeName -Type System.String } It "Should have KeepInputObject as a switch parameter" { - $CommandUnderTest | Should -HaveParameter KeepInputObject -Type Switch + $CommandUnderTest | Should -HaveParameter KeepInputObject -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaAgListener.Tests.ps1 b/tests/Set-DbaAgListener.Tests.ps1 index 9bad73431e..61d7f3f06b 100644 --- a/tests/Set-DbaAgListener.Tests.ps1 +++ b/tests/Set-DbaAgListener.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Set-DbaAgListener" { $CommandUnderTest = Get-Command Set-DbaAgListener } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] } It "Should have Listener as a parameter" { - $CommandUnderTest | Should -HaveParameter Listener -Type String[] + $CommandUnderTest | Should -HaveParameter Listener -Type System.String[] } It "Should have Port as a parameter" { - $CommandUnderTest | Should -HaveParameter Port -Type Int32 + $CommandUnderTest | Should -HaveParameter Port -Type System.Int32 } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaAgReplica.Tests.ps1 b/tests/Set-DbaAgReplica.Tests.ps1 index 074cc1b712..cb7c5af63e 100644 --- a/tests/Set-DbaAgReplica.Tests.ps1 +++ b/tests/Set-DbaAgReplica.Tests.ps1 @@ -17,46 +17,46 @@ Describe "Set-DbaAgReplica" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String } It "Should have Replica as a parameter" { - $CommandUnderTest | Should -HaveParameter Replica -Type String + $CommandUnderTest | Should -HaveParameter Replica -Type System.String } It "Should have AvailabilityMode as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityMode -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityMode -Type System.String } It "Should have FailoverMode as a parameter" { - $CommandUnderTest | Should -HaveParameter FailoverMode -Type String + $CommandUnderTest | Should -HaveParameter FailoverMode -Type System.String } It "Should have BackupPriority as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupPriority -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupPriority -Type System.Int32 } It "Should have ConnectionModeInPrimaryRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionModeInPrimaryRole -Type String + $CommandUnderTest | Should -HaveParameter ConnectionModeInPrimaryRole -Type System.String } It "Should have ConnectionModeInSecondaryRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionModeInSecondaryRole -Type String + $CommandUnderTest | Should -HaveParameter ConnectionModeInSecondaryRole -Type System.String } It "Should have SeedingMode as a parameter" { - $CommandUnderTest | Should -HaveParameter SeedingMode -Type String + $CommandUnderTest | Should -HaveParameter SeedingMode -Type System.String } It "Should have SessionTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter SessionTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter SessionTimeout -Type System.Int32 } It "Should have EndpointUrl as a parameter" { - $CommandUnderTest | Should -HaveParameter EndpointUrl -Type String + $CommandUnderTest | Should -HaveParameter EndpointUrl -Type System.String } It "Should have ReadonlyRoutingConnectionUrl as a parameter" { - $CommandUnderTest | Should -HaveParameter ReadonlyRoutingConnectionUrl -Type String + $CommandUnderTest | Should -HaveParameter ReadonlyRoutingConnectionUrl -Type System.String } It "Should have ReadOnlyRoutingList as a parameter" { - $CommandUnderTest | Should -HaveParameter ReadOnlyRoutingList -Type Object[] + $CommandUnderTest | Should -HaveParameter ReadOnlyRoutingList -Type System.Object[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityReplica } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaAgentAlert.Tests.ps1 b/tests/Set-DbaAgentAlert.Tests.ps1 index 0c4b236f30..d8186c80ca 100644 --- a/tests/Set-DbaAgentAlert.Tests.ps1 +++ b/tests/Set-DbaAgentAlert.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Set-DbaAgentAlert" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Alert parameter" { - $CommandUnderTest | Should -HaveParameter Alert -Type Object[] + $CommandUnderTest | Should -HaveParameter Alert -Type System.Object[] } It "Should have NewName parameter" { - $CommandUnderTest | Should -HaveParameter NewName -Type String + $CommandUnderTest | Should -HaveParameter NewName -Type System.String } It "Should have Enabled parameter" { - $CommandUnderTest | Should -HaveParameter Enabled -Type Switch + $CommandUnderTest | Should -HaveParameter Enabled -Type System.Management.Automation.SwitchParameter } It "Should have Disabled parameter" { - $CommandUnderTest | Should -HaveParameter Disabled -Type Switch + $CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter } 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 Alert[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Alert[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaAgentJob.Tests.ps1 b/tests/Set-DbaAgentJob.Tests.ps1 index 4f3309f068..9ab8e5bbea 100644 --- a/tests/Set-DbaAgentJob.Tests.ps1 +++ b/tests/Set-DbaAgentJob.Tests.ps1 @@ -6,73 +6,73 @@ Describe "Set-DbaAgentJob" { $CommandUnderTest = Get-Command Set-DbaAgentJob } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] } It "Should have Schedule as a parameter" { - $CommandUnderTest | Should -HaveParameter Schedule -Type Object[] + $CommandUnderTest | Should -HaveParameter Schedule -Type System.Object[] } It "Should have ScheduleId as a parameter" { - $CommandUnderTest | Should -HaveParameter ScheduleId -Type Int32[] + $CommandUnderTest | Should -HaveParameter ScheduleId -Type System.Int32[] } It "Should have NewName as a parameter" { - $CommandUnderTest | Should -HaveParameter NewName -Type String + $CommandUnderTest | Should -HaveParameter NewName -Type System.String } It "Should have Enabled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Enabled -Type Switch + $CommandUnderTest | Should -HaveParameter Enabled -Type System.Management.Automation.SwitchParameter } It "Should have Disabled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Disabled -Type Switch + $CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter } It "Should have Description as a parameter" { - $CommandUnderTest | Should -HaveParameter Description -Type String + $CommandUnderTest | Should -HaveParameter Description -Type System.String } It "Should have StartStepId as a parameter" { - $CommandUnderTest | Should -HaveParameter StartStepId -Type Int32 + $CommandUnderTest | Should -HaveParameter StartStepId -Type System.Int32 } It "Should have Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String + $CommandUnderTest | Should -HaveParameter Category -Type System.String } It "Should have OwnerLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter OwnerLogin -Type String + $CommandUnderTest | Should -HaveParameter OwnerLogin -Type System.String } It "Should have EventLogLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter EventLogLevel -Type Object + $CommandUnderTest | Should -HaveParameter EventLogLevel -Type System.Object } It "Should have EmailLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter EmailLevel -Type Object + $CommandUnderTest | Should -HaveParameter EmailLevel -Type System.Object } It "Should have NetsendLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter NetsendLevel -Type Object + $CommandUnderTest | Should -HaveParameter NetsendLevel -Type System.Object } It "Should have PageLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter PageLevel -Type Object + $CommandUnderTest | Should -HaveParameter PageLevel -Type System.Object } It "Should have EmailOperator as a parameter" { - $CommandUnderTest | Should -HaveParameter EmailOperator -Type String + $CommandUnderTest | Should -HaveParameter EmailOperator -Type System.String } It "Should have NetsendOperator as a parameter" { - $CommandUnderTest | Should -HaveParameter NetsendOperator -Type String + $CommandUnderTest | Should -HaveParameter NetsendOperator -Type System.String } It "Should have PageOperator as a parameter" { - $CommandUnderTest | Should -HaveParameter PageOperator -Type String + $CommandUnderTest | Should -HaveParameter PageOperator -Type System.String } It "Should have DeleteLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter DeleteLevel -Type Object + $CommandUnderTest | Should -HaveParameter DeleteLevel -Type System.Object } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Job[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaAgentJobCategory.Tests.ps1 b/tests/Set-DbaAgentJobCategory.Tests.ps1 index a5ed4112a6..d09eb6ed7e 100644 --- a/tests/Set-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Set-DbaAgentJobCategory.Tests.ps1 @@ -8,23 +8,23 @@ Describe "Set-DbaAgentJobCategory" { BeforeAll { $CommandUnderTest = Get-Command Set-DbaAgentJobCategory } - 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 NewName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter NewName -Type String[] -Mandatory:$false + It "Should have NewName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter NewName -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 } } diff --git a/tests/Set-DbaAgentJobOutputFile.Tests.ps1 b/tests/Set-DbaAgentJobOutputFile.Tests.ps1 index 1866119f22..790b4c8b0e 100644 --- a/tests/Set-DbaAgentJobOutputFile.Tests.ps1 +++ b/tests/Set-DbaAgentJobOutputFile.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Set-DbaAgentJobOutputFile" { $CommandUnderTest = Get-Command Set-DbaAgentJobOutputFile } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] } It "Should have Step as a parameter" { - $CommandUnderTest | Should -HaveParameter Step -Type Object[] + $CommandUnderTest | Should -HaveParameter Step -Type System.Object[] } It "Should have OutputFile as a parameter" { - $CommandUnderTest | Should -HaveParameter OutputFile -Type String + $CommandUnderTest | Should -HaveParameter OutputFile -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaAgentJobOwner.Tests.ps1 b/tests/Set-DbaAgentJobOwner.Tests.ps1 index 87affc8c1c..0436368657 100644 --- a/tests/Set-DbaAgentJobOwner.Tests.ps1 +++ b/tests/Set-DbaAgentJobOwner.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Set-DbaAgentJobOwner" { $CommandUnderTest = Get-Command Set-DbaAgentJobOwner } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Job parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] } It "Should have ExcludeJob parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeJob -Type System.Object[] } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Job[] } It "Should have Login parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String + $CommandUnderTest | Should -HaveParameter Login -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaAgentJobStep.Tests.ps1 b/tests/Set-DbaAgentJobStep.Tests.ps1 index 1086a42ded..cdb4e4d254 100644 --- a/tests/Set-DbaAgentJobStep.Tests.ps1 +++ b/tests/Set-DbaAgentJobStep.Tests.ps1 @@ -24,13 +24,13 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { @(Compare-Object -ReferenceObject $knownParameters -DifferenceObject $params).Count | Should -Be 0 } - It "Should have SqlInstance parameter of type DbaInstanceParameter[] and not mandatory" { - (Get-Command $CommandName).Parameters['SqlInstance'].ParameterType.FullName | Should -Be 'DbaInstanceParameter[]' + It "Should have SqlInstance parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] and not mandatory" { + (Get-Command $CommandName).Parameters['SqlInstance'].ParameterType.FullName | Should -Be 'Dataplat.Dbatools.Parameter.DbaInstanceParameter[]' (Get-Command $CommandName).Parameters['SqlInstance'].Attributes.Mandatory | Should -Be $false } - It "Should have SqlCredential parameter of type PSCredential and not mandatory" { - (Get-Command $CommandName).Parameters['SqlCredential'].ParameterType.FullName | Should -Be 'PSCredential' + It "Should have SqlCredential parameter of type System.Management.Automation.PSCredential and not mandatory" { + (Get-Command $CommandName).Parameters['SqlCredential'].ParameterType.FullName | Should -Be 'System.Management.Automation.PSCredential' (Get-Command $CommandName).Parameters['SqlCredential'].Attributes.Mandatory | Should -Be $false } diff --git a/tests/Set-DbaAgentOperator.Tests.ps1 b/tests/Set-DbaAgentOperator.Tests.ps1 index 9e54a76879..d067cde6a3 100644 --- a/tests/Set-DbaAgentOperator.Tests.ps1 +++ b/tests/Set-DbaAgentOperator.Tests.ps1 @@ -12,58 +12,58 @@ Describe "Set-DbaAgentOperator" { $CommandUnderTest = Get-Command Set-DbaAgentOperator } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Operator as a parameter" { - $CommandUnderTest | Should -HaveParameter Operator -Type String[] + $CommandUnderTest | Should -HaveParameter Operator -Type System.String[] } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have EmailAddress as a parameter" { - $CommandUnderTest | Should -HaveParameter EmailAddress -Type String + $CommandUnderTest | Should -HaveParameter EmailAddress -Type System.String } It "Should have NetSendAddress as a parameter" { - $CommandUnderTest | Should -HaveParameter NetSendAddress -Type String + $CommandUnderTest | Should -HaveParameter NetSendAddress -Type System.String } It "Should have PagerAddress as a parameter" { - $CommandUnderTest | Should -HaveParameter PagerAddress -Type String + $CommandUnderTest | Should -HaveParameter PagerAddress -Type System.String } It "Should have PagerDay as a parameter" { - $CommandUnderTest | Should -HaveParameter PagerDay -Type String + $CommandUnderTest | Should -HaveParameter PagerDay -Type System.String } It "Should have SaturdayStartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter SaturdayStartTime -Type String + $CommandUnderTest | Should -HaveParameter SaturdayStartTime -Type System.String } It "Should have SaturdayEndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter SaturdayEndTime -Type String + $CommandUnderTest | Should -HaveParameter SaturdayEndTime -Type System.String } It "Should have SundayStartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter SundayStartTime -Type String + $CommandUnderTest | Should -HaveParameter SundayStartTime -Type System.String } It "Should have SundayEndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter SundayEndTime -Type String + $CommandUnderTest | Should -HaveParameter SundayEndTime -Type System.String } It "Should have WeekdayStartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter WeekdayStartTime -Type String + $CommandUnderTest | Should -HaveParameter WeekdayStartTime -Type System.String } It "Should have WeekdayEndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter WeekdayEndTime -Type String + $CommandUnderTest | Should -HaveParameter WeekdayEndTime -Type System.String } It "Should have IsFailsafeOperator as a parameter" { - $CommandUnderTest | Should -HaveParameter IsFailsafeOperator -Type Switch + $CommandUnderTest | Should -HaveParameter IsFailsafeOperator -Type System.Management.Automation.Switch } It "Should have FailsafeNotificationMethod as a parameter" { - $CommandUnderTest | Should -HaveParameter FailsafeNotificationMethod -Type String[] + $CommandUnderTest | Should -HaveParameter FailsafeNotificationMethod -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Operator[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Operator[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Set-DbaAgentSchedule.Tests.ps1 b/tests/Set-DbaAgentSchedule.Tests.ps1 index fc79696bff..ac6d08800c 100644 --- a/tests/Set-DbaAgentSchedule.Tests.ps1 +++ b/tests/Set-DbaAgentSchedule.Tests.ps1 @@ -10,61 +10,61 @@ Describe "Set-DbaAgentSchedule" { $CommandUnderTest = Get-Command Set-DbaAgentSchedule } 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 Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] -Mandatory:$false } It "Should have ScheduleName parameter" { - $CommandUnderTest | Should -HaveParameter ScheduleName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ScheduleName -Type System.String -Mandatory:$false } It "Should have NewName parameter" { - $CommandUnderTest | Should -HaveParameter NewName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NewName -Type System.String -Mandatory:$false } It "Should have Enabled parameter" { - $CommandUnderTest | Should -HaveParameter Enabled -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Enabled -Type System.Management.Automation.Switch -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 FrequencyType parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyType -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyType -Type System.Object -Mandatory:$false } It "Should have FrequencyInterval parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyInterval -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyInterval -Type System.Object[] -Mandatory:$false } It "Should have FrequencySubdayType parameter" { - $CommandUnderTest | Should -HaveParameter FrequencySubdayType -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencySubdayType -Type System.Object -Mandatory:$false } It "Should have FrequencySubdayInterval parameter" { - $CommandUnderTest | Should -HaveParameter FrequencySubdayInterval -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencySubdayInterval -Type System.Int32 -Mandatory:$false } It "Should have FrequencyRelativeInterval parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyRelativeInterval -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyRelativeInterval -Type System.Object -Mandatory:$false } It "Should have FrequencyRecurrenceFactor parameter" { - $CommandUnderTest | Should -HaveParameter FrequencyRecurrenceFactor -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FrequencyRecurrenceFactor -Type System.Int32 -Mandatory:$false } It "Should have StartDate parameter" { - $CommandUnderTest | Should -HaveParameter StartDate -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StartDate -Type System.String -Mandatory:$false } It "Should have EndDate parameter" { - $CommandUnderTest | Should -HaveParameter EndDate -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EndDate -Type System.String -Mandatory:$false } It "Should have StartTime parameter" { - $CommandUnderTest | Should -HaveParameter StartTime -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StartTime -Type System.String -Mandatory:$false } It "Should have EndTime parameter" { - $CommandUnderTest | Should -HaveParameter EndTime -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EndTime -Type System.String -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 } It "Should have Force parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.Switch -Mandatory:$false } } diff --git a/tests/Set-DbaAgentServer.Tests.ps1 b/tests/Set-DbaAgentServer.Tests.ps1 index 4881e65adb..b77bdd77db 100644 --- a/tests/Set-DbaAgentServer.Tests.ps1 +++ b/tests/Set-DbaAgentServer.Tests.ps1 @@ -22,76 +22,76 @@ Describe "Set-DbaAgentServer" { $CommandUnderTest = Get-Command Set-DbaAgentServer } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.JobServer[] -Mandatory:$false } It "Should have AgentLogLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter AgentLogLevel -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AgentLogLevel -Type System.Object -Mandatory:$false } It "Should have AgentMailType as a parameter" { - $CommandUnderTest | Should -HaveParameter AgentMailType -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AgentMailType -Type System.Object -Mandatory:$false } It "Should have AgentShutdownWaitTime as a parameter" { - $CommandUnderTest | Should -HaveParameter AgentShutdownWaitTime -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AgentShutdownWaitTime -Type System.Int32 -Mandatory:$false } It "Should have DatabaseMailProfile as a parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseMailProfile -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DatabaseMailProfile -Type System.String -Mandatory:$false } It "Should have ErrorLogFile as a parameter" { - $CommandUnderTest | Should -HaveParameter ErrorLogFile -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ErrorLogFile -Type System.String -Mandatory:$false } It "Should have IdleCpuDuration as a parameter" { - $CommandUnderTest | Should -HaveParameter IdleCpuDuration -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IdleCpuDuration -Type System.Int32 -Mandatory:$false } It "Should have IdleCpuPercentage as a parameter" { - $CommandUnderTest | Should -HaveParameter IdleCpuPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IdleCpuPercentage -Type System.Int32 -Mandatory:$false } It "Should have CpuPolling as a parameter" { - $CommandUnderTest | Should -HaveParameter CpuPolling -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CpuPolling -Type System.String -Mandatory:$false } It "Should have LocalHostAlias as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalHostAlias -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LocalHostAlias -Type System.String -Mandatory:$false } It "Should have LoginTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter LoginTimeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LoginTimeout -Type System.Int32 -Mandatory:$false } It "Should have MaximumHistoryRows as a parameter" { - $CommandUnderTest | Should -HaveParameter MaximumHistoryRows -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumHistoryRows -Type System.Int32 -Mandatory:$false } It "Should have MaximumJobHistoryRows as a parameter" { - $CommandUnderTest | Should -HaveParameter MaximumJobHistoryRows -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumJobHistoryRows -Type System.Int32 -Mandatory:$false } It "Should have NetSendRecipient as a parameter" { - $CommandUnderTest | Should -HaveParameter NetSendRecipient -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NetSendRecipient -Type System.String -Mandatory:$false } It "Should have ReplaceAlertTokens as a parameter" { - $CommandUnderTest | Should -HaveParameter ReplaceAlertTokens -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ReplaceAlertTokens -Type System.String -Mandatory:$false } It "Should have SaveInSentFolder as a parameter" { - $CommandUnderTest | Should -HaveParameter SaveInSentFolder -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SaveInSentFolder -Type System.String -Mandatory:$false } It "Should have SqlAgentAutoStart as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlAgentAutoStart -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlAgentAutoStart -Type System.String -Mandatory:$false } It "Should have SqlAgentMailProfile as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlAgentMailProfile -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlAgentMailProfile -Type System.String -Mandatory:$false } It "Should have SqlAgentRestart as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlAgentRestart -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlAgentRestart -Type System.String -Mandatory:$false } It "Should have SqlServerRestart as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlServerRestart -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlServerRestart -Type System.String -Mandatory:$false } It "Should have WriteOemErrorLog as a parameter" { - $CommandUnderTest | Should -HaveParameter WriteOemErrorLog -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WriteOemErrorLog -Type System.String -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Set-DbaAvailabilityGroup.Tests.ps1 b/tests/Set-DbaAvailabilityGroup.Tests.ps1 index 85ede1364e..19355ef6c8 100644 --- a/tests/Set-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Set-DbaAvailabilityGroup.Tests.ps1 @@ -6,46 +6,46 @@ Describe "Set-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command Set-DbaAvailabilityGroup } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] } It "Should have AllAvailabilityGroups as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllAvailabilityGroups -Type Switch + $CommandUnderTest | Should -HaveParameter AllAvailabilityGroups -Type System.Management.Automation.SwitchParameter } It "Should have DtcSupportEnabled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DtcSupportEnabled -Type Switch + $CommandUnderTest | Should -HaveParameter DtcSupportEnabled -Type System.Management.Automation.SwitchParameter } It "Should have ClusterType as a parameter" { - $CommandUnderTest | Should -HaveParameter ClusterType -Type String + $CommandUnderTest | Should -HaveParameter ClusterType -Type System.String } It "Should have AutomatedBackupPreference as a parameter" { - $CommandUnderTest | Should -HaveParameter AutomatedBackupPreference -Type String + $CommandUnderTest | Should -HaveParameter AutomatedBackupPreference -Type System.String } It "Should have FailureConditionLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter FailureConditionLevel -Type String + $CommandUnderTest | Should -HaveParameter FailureConditionLevel -Type System.String } It "Should have HealthCheckTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter HealthCheckTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter HealthCheckTimeout -Type System.Int32 } It "Should have BasicAvailabilityGroup as a switch parameter" { - $CommandUnderTest | Should -HaveParameter BasicAvailabilityGroup -Type Switch + $CommandUnderTest | Should -HaveParameter BasicAvailabilityGroup -Type System.Management.Automation.SwitchParameter } It "Should have DatabaseHealthTrigger as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseHealthTrigger -Type Switch + $CommandUnderTest | Should -HaveParameter DatabaseHealthTrigger -Type System.Management.Automation.SwitchParameter } It "Should have IsDistributedAvailabilityGroup as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsDistributedAvailabilityGroup -Type Switch + $CommandUnderTest | Should -HaveParameter IsDistributedAvailabilityGroup -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaCmConnection.Tests.ps1 b/tests/Set-DbaCmConnection.Tests.ps1 index 37934f675e..8d3477576c 100644 --- a/tests/Set-DbaCmConnection.Tests.ps1 +++ b/tests/Set-DbaCmConnection.Tests.ps1 @@ -6,67 +6,67 @@ Describe "Set-DbaCmConnection" { $CommandUnderTest = Get-Command Set-DbaCmConnection } It "Should have ComputerName parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaCmConnectionParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaCmConnectionParameter[] -Mandatory:$false } It "Should have Credential parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have UseWindowsCredentials parameter" { - $CommandUnderTest | Should -HaveParameter UseWindowsCredentials -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter UseWindowsCredentials -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have OverrideExplicitCredential parameter" { - $CommandUnderTest | Should -HaveParameter OverrideExplicitCredential -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter OverrideExplicitCredential -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have OverrideConnectionPolicy parameter" { - $CommandUnderTest | Should -HaveParameter OverrideConnectionPolicy -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter OverrideConnectionPolicy -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DisabledConnectionTypes parameter" { $CommandUnderTest | Should -HaveParameter DisabledConnectionTypes -Type Dataplat.Dbatools.Connection.ManagementConnectionType -Mandatory:$false } It "Should have DisableBadCredentialCache parameter" { - $CommandUnderTest | Should -HaveParameter DisableBadCredentialCache -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DisableBadCredentialCache -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DisableCimPersistence parameter" { - $CommandUnderTest | Should -HaveParameter DisableCimPersistence -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DisableCimPersistence -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DisableCredentialAutoRegister parameter" { - $CommandUnderTest | Should -HaveParameter DisableCredentialAutoRegister -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DisableCredentialAutoRegister -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableCredentialFailover parameter" { - $CommandUnderTest | Should -HaveParameter EnableCredentialFailover -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableCredentialFailover -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have WindowsCredentialsAreBad parameter" { - $CommandUnderTest | Should -HaveParameter WindowsCredentialsAreBad -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WindowsCredentialsAreBad -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have CimWinRMOptions parameter" { - $CommandUnderTest | Should -HaveParameter CimWinRMOptions -Type WSManSessionOptions -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CimWinRMOptions -Type Microsoft.Management.Infrastructure.Options.WSManSessionOptions -Mandatory:$false } It "Should have CimDCOMOptions parameter" { - $CommandUnderTest | Should -HaveParameter CimDCOMOptions -Type DComSessionOptions -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CimDCOMOptions -Type Microsoft.Management.Infrastructure.Options.DComSessionOptions -Mandatory:$false } It "Should have AddBadCredential parameter" { - $CommandUnderTest | Should -HaveParameter AddBadCredential -Type PSCredential[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AddBadCredential -Type System.Management.Automation.PSCredential[] -Mandatory:$false } It "Should have RemoveBadCredential parameter" { - $CommandUnderTest | Should -HaveParameter RemoveBadCredential -Type PSCredential[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RemoveBadCredential -Type System.Management.Automation.PSCredential[] -Mandatory:$false } It "Should have ClearBadCredential parameter" { - $CommandUnderTest | Should -HaveParameter ClearBadCredential -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ClearBadCredential -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ClearCredential parameter" { - $CommandUnderTest | Should -HaveParameter ClearCredential -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ClearCredential -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ResetCredential parameter" { - $CommandUnderTest | Should -HaveParameter ResetCredential -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResetCredential -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ResetConnectionStatus parameter" { - $CommandUnderTest | Should -HaveParameter ResetConnectionStatus -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResetConnectionStatus -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ResetConfiguration parameter" { - $CommandUnderTest | Should -HaveParameter ResetConfiguration -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResetConfiguration -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Set-DbaDbCompatibility.Tests.ps1 b/tests/Set-DbaDbCompatibility.Tests.ps1 index c42cabda2c..c10c7f81e4 100644 --- a/tests/Set-DbaDbCompatibility.Tests.ps1 +++ b/tests/Set-DbaDbCompatibility.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Set-DbaDbCompatibility" { $CommandUnderTest = Get-Command Set-DbaDbCompatibility } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Compatibility parameter" { - $CommandUnderTest | Should -HaveParameter Compatibility -Type CompatibilityLevel + $CommandUnderTest | Should -HaveParameter Compatibility -Type Microsoft.SqlServer.Management.Smo.CompatibilityLevel } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaDbCompression.Tests.ps1 b/tests/Set-DbaDbCompression.Tests.ps1 index cabd9fe4ed..12c0e3e085 100644 --- a/tests/Set-DbaDbCompression.Tests.ps1 +++ b/tests/Set-DbaDbCompression.Tests.ps1 @@ -31,16 +31,16 @@ Describe "Set-DbaDbCompression" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] } It "Should have CompressionType as a parameter" { - $CommandUnderTest | Should -HaveParameter CompressionType -Type String + $CommandUnderTest | Should -HaveParameter CompressionType -Type System.String } It "Should have MaxRunTime as a parameter" { $CommandUnderTest | Should -HaveParameter MaxRunTime -Type Int32 @@ -49,13 +49,13 @@ Describe "Set-DbaDbCompression" { $CommandUnderTest | Should -HaveParameter PercentCompression -Type Int32 } It "Should have ForceOfflineRebuilds as a parameter" { - $CommandUnderTest | Should -HaveParameter ForceOfflineRebuilds -Type Switch + $CommandUnderTest | Should -HaveParameter ForceOfflineRebuilds -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaDbFileGroup.Tests.ps1 b/tests/Set-DbaDbFileGroup.Tests.ps1 index e51b558d92..b748d52feb 100644 --- a/tests/Set-DbaDbFileGroup.Tests.ps1 +++ b/tests/Set-DbaDbFileGroup.Tests.ps1 @@ -31,31 +31,31 @@ Describe "Set-DbaDbFileGroup" { $CommandUnderTest = Get-Command Set-DbaDbFileGroup } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have FileGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter FileGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileGroup -Type System.String[] -Mandatory:$false } It "Should have Default as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Default -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Default -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ReadOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ReadOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ReadOnly -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have AutoGrowAllFiles as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AutoGrowAllFiles -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AutoGrowAllFiles -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Set-DbaDbFileGrowth.Tests.ps1 b/tests/Set-DbaDbFileGrowth.Tests.ps1 index b0551c19a6..9f22426728 100644 --- a/tests/Set-DbaDbFileGrowth.Tests.ps1 +++ b/tests/Set-DbaDbFileGrowth.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Set-DbaDbFileGrowth" { $CommandUnderTest = Get-Command Set-DbaDbFileGrowth } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have GrowthType as a parameter" { - $CommandUnderTest | Should -HaveParameter GrowthType -Type String + $CommandUnderTest | Should -HaveParameter GrowthType -Type System.String } It "Should have Growth as a parameter" { - $CommandUnderTest | Should -HaveParameter Growth -Type Int32 + $CommandUnderTest | Should -HaveParameter Growth -Type System.Int32 } It "Should have FileType as a parameter" { - $CommandUnderTest | Should -HaveParameter FileType -Type String + $CommandUnderTest | Should -HaveParameter FileType -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaDbIdentity.Tests.ps1 b/tests/Set-DbaDbIdentity.Tests.ps1 index ccf773e4f0..78435eca6a 100644 --- a/tests/Set-DbaDbIdentity.Tests.ps1 +++ b/tests/Set-DbaDbIdentity.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Set-DbaDbIdentity" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] } It "Should have ReSeedValue as a parameter" { - $CommandUnderTest | Should -HaveParameter ReSeedValue -Type Int32 + $CommandUnderTest | Should -HaveParameter ReSeedValue -Type System.Int32 } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaDbMirror.Tests.ps1 b/tests/Set-DbaDbMirror.Tests.ps1 index df597946c6..f54e8cde55 100644 --- a/tests/Set-DbaDbMirror.Tests.ps1 +++ b/tests/Set-DbaDbMirror.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Set-DbaDbMirror" { $CommandUnderTest = Get-Command Set-DbaDbMirror } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have Partner parameter" { - $CommandUnderTest | Should -HaveParameter Partner -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Partner -Type System.String -Mandatory:$false } It "Should have Witness parameter" { - $CommandUnderTest | Should -HaveParameter Witness -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Witness -Type System.String -Mandatory:$false } It "Should have SafetyLevel parameter" { - $CommandUnderTest | Should -HaveParameter SafetyLevel -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SafetyLevel -Type System.String -Mandatory:$false } It "Should have State parameter" { - $CommandUnderTest | Should -HaveParameter State -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter State -Type System.String -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Set-DbaDbOwner.Tests.ps1 b/tests/Set-DbaDbOwner.Tests.ps1 index bf5152e3f6..8ce721d26e 100644 --- a/tests/Set-DbaDbOwner.Tests.ps1 +++ b/tests/Set-DbaDbOwner.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Set-DbaDbOwner Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Set-DbaDbOwner } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have TargetLogin parameter" { - $CommandUnderTest | Should -HaveParameter TargetLogin -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter TargetLogin -Type System.String -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Set-DbaDbQueryStoreOption.Tests.ps1 b/tests/Set-DbaDbQueryStoreOption.Tests.ps1 index ab771610cc..2927b45ca6 100644 --- a/tests/Set-DbaDbQueryStoreOption.Tests.ps1 +++ b/tests/Set-DbaDbQueryStoreOption.Tests.ps1 @@ -18,55 +18,55 @@ Describe "Set-DbaDbQueryStoreOption" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have AllDatabases parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have State parameter" { - $CommandUnderTest | Should -HaveParameter State -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter State -Type System.String[] -Mandatory:$false } It "Should have FlushInterval parameter" { - $CommandUnderTest | Should -HaveParameter FlushInterval -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FlushInterval -Type System.Int64 -Mandatory:$false } It "Should have CollectionInterval parameter" { - $CommandUnderTest | Should -HaveParameter CollectionInterval -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CollectionInterval -Type System.Int64 -Mandatory:$false } It "Should have MaxSize parameter" { - $CommandUnderTest | Should -HaveParameter MaxSize -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxSize -Type System.Int64 -Mandatory:$false } It "Should have CaptureMode parameter" { - $CommandUnderTest | Should -HaveParameter CaptureMode -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CaptureMode -Type System.String[] -Mandatory:$false } It "Should have CleanupMode parameter" { - $CommandUnderTest | Should -HaveParameter CleanupMode -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CleanupMode -Type System.String[] -Mandatory:$false } It "Should have StaleQueryThreshold parameter" { - $CommandUnderTest | Should -HaveParameter StaleQueryThreshold -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StaleQueryThreshold -Type System.Int64 -Mandatory:$false } It "Should have MaxPlansPerQuery parameter" { - $CommandUnderTest | Should -HaveParameter MaxPlansPerQuery -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxPlansPerQuery -Type System.Int64 -Mandatory:$false } It "Should have WaitStatsCaptureMode parameter" { - $CommandUnderTest | Should -HaveParameter WaitStatsCaptureMode -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WaitStatsCaptureMode -Type System.String[] -Mandatory:$false } It "Should have CustomCapturePolicyExecutionCount parameter" { - $CommandUnderTest | Should -HaveParameter CustomCapturePolicyExecutionCount -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CustomCapturePolicyExecutionCount -Type System.Int64 -Mandatory:$false } It "Should have CustomCapturePolicyTotalCompileCPUTimeMS parameter" { - $CommandUnderTest | Should -HaveParameter CustomCapturePolicyTotalCompileCPUTimeMS -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CustomCapturePolicyTotalCompileCPUTimeMS -Type System.Int64 -Mandatory:$false } It "Should have CustomCapturePolicyTotalExecutionCPUTimeMS parameter" { - $CommandUnderTest | Should -HaveParameter CustomCapturePolicyTotalExecutionCPUTimeMS -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CustomCapturePolicyTotalExecutionCPUTimeMS -Type System.Int64 -Mandatory:$false } It "Should have CustomCapturePolicyStaleThresholdHours parameter" { - $CommandUnderTest | Should -HaveParameter CustomCapturePolicyStaleThresholdHours -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CustomCapturePolicyStaleThresholdHours -Type System.Int64 -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Set-DbaDbRecoveryModel.Tests.ps1 b/tests/Set-DbaDbRecoveryModel.Tests.ps1 index 1993e14109..679723abf8 100644 --- a/tests/Set-DbaDbRecoveryModel.Tests.ps1 +++ b/tests/Set-DbaDbRecoveryModel.Tests.ps1 @@ -10,25 +10,25 @@ Describe "Set-DbaDbRecoveryModel" { $CommandUnderTest = Get-Command Set-DbaDbRecoveryModel } 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 RecoveryModel parameter" { - $CommandUnderTest | Should -HaveParameter RecoveryModel -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RecoveryModel -Type System.String -Mandatory:$false } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have AllDatabases parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false diff --git a/tests/Set-DbaDbSchema.Tests.ps1 b/tests/Set-DbaDbSchema.Tests.ps1 index cc55cd859f..94f42c695b 100644 --- a/tests/Set-DbaDbSchema.Tests.ps1 +++ b/tests/Set-DbaDbSchema.Tests.ps1 @@ -39,19 +39,19 @@ Describe "Set-DbaDbSchema" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String[] + $CommandUnderTest | Should -HaveParameter Schema -Type System.String[] } It "Should have SchemaOwner as a parameter" { - $CommandUnderTest | Should -HaveParameter SchemaOwner -Type String + $CommandUnderTest | Should -HaveParameter SchemaOwner -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaDbSequence.Tests.ps1 b/tests/Set-DbaDbSequence.Tests.ps1 index 7f45a378c0..151f1dcb25 100644 --- a/tests/Set-DbaDbSequence.Tests.ps1 +++ b/tests/Set-DbaDbSequence.Tests.ps1 @@ -6,43 +6,43 @@ Describe "Set-DbaDbSequence" { $CommandUnderTest = Get-Command Set-DbaDbSequence } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Sequence as a parameter" { - $CommandUnderTest | Should -HaveParameter Sequence -Type String[] + $CommandUnderTest | Should -HaveParameter Sequence -Type System.String[] } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have RestartWith as a parameter" { - $CommandUnderTest | Should -HaveParameter RestartWith -Type Int64 + $CommandUnderTest | Should -HaveParameter RestartWith -Type System.Int64 } It "Should have IncrementBy as a parameter" { - $CommandUnderTest | Should -HaveParameter IncrementBy -Type Int64 + $CommandUnderTest | Should -HaveParameter IncrementBy -Type System.Int64 } It "Should have MinValue as a parameter" { - $CommandUnderTest | Should -HaveParameter MinValue -Type Int64 + $CommandUnderTest | Should -HaveParameter MinValue -Type System.Int64 } It "Should have MaxValue as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxValue -Type Int64 + $CommandUnderTest | Should -HaveParameter MaxValue -Type System.Int64 } It "Should have Cycle as a parameter" { - $CommandUnderTest | Should -HaveParameter Cycle -Type Switch + $CommandUnderTest | Should -HaveParameter Cycle -Type System.Management.Automation.SwitchParameter } It "Should have CacheSize as a parameter" { - $CommandUnderTest | Should -HaveParameter CacheSize -Type Int32 + $CommandUnderTest | Should -HaveParameter CacheSize -Type System.Int32 } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaDbState.Tests.ps1 b/tests/Set-DbaDbState.Tests.ps1 index 686c41245e..251920b35d 100644 --- a/tests/Set-DbaDbState.Tests.ps1 +++ b/tests/Set-DbaDbState.Tests.ps1 @@ -11,16 +11,16 @@ Describe "Set-DbaDbState Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Set-DbaDbState } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have AllDatabases as a switch parameter" { $CommandUnderTest | Should -HaveParameter AllDatabases -Type switch @@ -59,7 +59,7 @@ Describe "Set-DbaDbState Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter EnableException -Type switch } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject[] } } } diff --git a/tests/Set-DbaDefaultPath.Tests.ps1 b/tests/Set-DbaDefaultPath.Tests.ps1 index 1c06a31cfe..74c1b2591a 100644 --- a/tests/Set-DbaDefaultPath.Tests.ps1 +++ b/tests/Set-DbaDefaultPath.Tests.ps1 @@ -17,14 +17,14 @@ Describe "Set-DbaDefaultPath" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } - It "Should have Type as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] -Mandatory:$false + It "Should have Type as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] -Mandatory:$false } - It "Should have Path as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -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 } } diff --git a/tests/Set-DbaEndpoint.Tests.ps1 b/tests/Set-DbaEndpoint.Tests.ps1 index 7d0e25aba1..3a0ce326e5 100644 --- a/tests/Set-DbaEndpoint.Tests.ps1 +++ b/tests/Set-DbaEndpoint.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Set-DbaEndpoint" { $CommandUnderTest = Get-Command Set-DbaEndpoint } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Endpoint parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String[] + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String[] } It "Should have Owner parameter" { - $CommandUnderTest | Should -HaveParameter Owner -Type String + $CommandUnderTest | Should -HaveParameter Owner -Type System.String } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String + $CommandUnderTest | Should -HaveParameter Type -Type System.String } It "Should have AllEndpoints parameter" { - $CommandUnderTest | Should -HaveParameter AllEndpoints -Type Switch + $CommandUnderTest | Should -HaveParameter AllEndpoints -Type System.Management.Automation.SwitchParameter } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Endpoint[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Endpoint[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaErrorLogConfig.Tests.ps1 b/tests/Set-DbaErrorLogConfig.Tests.ps1 index 5e8bed908d..a707d8aa73 100644 --- a/tests/Set-DbaErrorLogConfig.Tests.ps1 +++ b/tests/Set-DbaErrorLogConfig.Tests.ps1 @@ -18,13 +18,13 @@ Describe "Set-DbaErrorLogConfig" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have LogCount as a parameter" { - $CommandUnderTest | Should -HaveParameter LogCount -Type Int32 + $CommandUnderTest | Should -HaveParameter LogCount -Type System.Int32 } It "Should have LogSize as a parameter" { - $CommandUnderTest | Should -HaveParameter LogSize -Type Int32 + $CommandUnderTest | Should -HaveParameter LogSize -Type System.Int32 } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaExtendedProperty.Tests.ps1 b/tests/Set-DbaExtendedProperty.Tests.ps1 index 25192cf383..78e888ab11 100644 --- a/tests/Set-DbaExtendedProperty.Tests.ps1 +++ b/tests/Set-DbaExtendedProperty.Tests.ps1 @@ -9,16 +9,16 @@ Describe "Set-DbaExtendedProperty" { $CommandUnderTest | Should -HaveParameter InputObject -Type ExtendedProperty[] } It "Should have Value as a parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type String + $CommandUnderTest | Should -HaveParameter Value -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have WhatIf as a parameter" { - $CommandUnderTest | Should -HaveParameter WhatIf -Type Switch + $CommandUnderTest | Should -HaveParameter WhatIf -Type System.Management.Automation.SwitchParameter } It "Should have Confirm as a parameter" { - $CommandUnderTest | Should -HaveParameter Confirm -Type Switch + $CommandUnderTest | Should -HaveParameter Confirm -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Set-DbaExtendedProtection.Tests.ps1 b/tests/Set-DbaExtendedProtection.Tests.ps1 index ff89dfb94c..67f6ae6516 100644 --- a/tests/Set-DbaExtendedProtection.Tests.ps1 +++ b/tests/Set-DbaExtendedProtection.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Set-DbaExtendedProtection" { $CommandUnderTest = Get-Command Set-DbaExtendedProtection } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Microsoft.SqlServer.Management.Smo.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Value as a parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type Object + $CommandUnderTest | Should -HaveParameter Value -Type System.Object } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } @@ -42,7 +42,7 @@ Describe "Set-DbaExtendedProtection" { $ScriptBlock, $EnableException ) - $server = [DbaInstanceParameter[]]$global:instance1 + $server = [Microsoft.SqlServer.Management.Smo.DbaInstanceParameter[]]$global:instance1 @{ DisplayName = "SQL Server ($($instance.InstanceName))" AdvancedProperties = @( diff --git a/tests/Set-DbaLogin.Tests.ps1 b/tests/Set-DbaLogin.Tests.ps1 index 5fb65914a5..ffbef82c20 100644 --- a/tests/Set-DbaLogin.Tests.ps1 +++ b/tests/Set-DbaLogin.Tests.ps1 @@ -30,25 +30,25 @@ Describe "Set-DbaLogin" { } It "Should have the correct parameters" { - $command | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false - $command | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false - $command | Should -HaveParameter Login -Type String[] -Mandatory:$false - $command | Should -HaveParameter SecurePassword -Type Object -Mandatory:$false - $command | Should -HaveParameter DefaultDatabase -Type String -Mandatory:$false - $command | Should -HaveParameter Unlock -Type Switch -Mandatory:$false - $command | Should -HaveParameter PasswordMustChange -Type Switch -Mandatory:$false - $command | Should -HaveParameter NewName -Type String -Mandatory:$false - $command | Should -HaveParameter Disable -Type Switch -Mandatory:$false - $command | Should -HaveParameter Enable -Type Switch -Mandatory:$false - $command | Should -HaveParameter DenyLogin -Type Switch -Mandatory:$false - $command | Should -HaveParameter GrantLogin -Type Switch -Mandatory:$false - $command | Should -HaveParameter PasswordPolicyEnforced -Type Switch -Mandatory:$false - $command | Should -HaveParameter PasswordExpirationEnabled -Type Switch -Mandatory:$false - $command | Should -HaveParameter AddRole -Type String[] -Mandatory:$false - $command | Should -HaveParameter RemoveRole -Type String[] -Mandatory:$false + $command | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false + $command | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false + $command | Should -HaveParameter Login -Type System.String[] -Mandatory:$false + $command | Should -HaveParameter SecurePassword -Type System.Object -Mandatory:$false + $command | Should -HaveParameter DefaultDatabase -Type System.String -Mandatory:$false + $command | Should -HaveParameter Unlock -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter PasswordMustChange -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter NewName -Type System.String -Mandatory:$false + $command | Should -HaveParameter Disable -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter Enable -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter DenyLogin -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter GrantLogin -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter PasswordPolicyEnforced -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter PasswordExpirationEnabled -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter AddRole -Type System.String[] -Mandatory:$false + $command | Should -HaveParameter RemoveRole -Type System.String[] -Mandatory:$false $command | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Login[] -Mandatory:$false - $command | Should -HaveParameter Force -Type Switch -Mandatory:$false - $command | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $command | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false + $command | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Validates -AddRole contains <_>" -ForEach $systemRoles { diff --git a/tests/Set-DbaMaxDop.Tests.ps1 b/tests/Set-DbaMaxDop.Tests.ps1 index 3743f0dcad..e7b2c781ad 100644 --- a/tests/Set-DbaMaxDop.Tests.ps1 +++ b/tests/Set-DbaMaxDop.Tests.ps1 @@ -14,28 +14,28 @@ Describe "Set-DbaMaxDop" { $CommandUnderTest = Get-Command Set-DbaMaxDop } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have MaxDop parameter" { - $CommandUnderTest | Should -HaveParameter MaxDop -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxDop -Type System.Int32 -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject -Mandatory:$false } It "Should have AllDatabases parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Set-DbaMaxMemory.Tests.ps1 b/tests/Set-DbaMaxMemory.Tests.ps1 index 057b3cd9b0..243f0fe21a 100644 --- a/tests/Set-DbaMaxMemory.Tests.ps1 +++ b/tests/Set-DbaMaxMemory.Tests.ps1 @@ -20,19 +20,19 @@ Describe "Set-DbaMaxMemory" { $CommandUnderTest = Get-Command Set-DbaMaxMemory } 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 Max parameter" { - $CommandUnderTest | Should -HaveParameter Max -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Max -Type System.Int32 -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Set-DbaNetworkCertificate.Tests.ps1 b/tests/Set-DbaNetworkCertificate.Tests.ps1 index 271e1a173c..495ad62450 100644 --- a/tests/Set-DbaNetworkCertificate.Tests.ps1 +++ b/tests/Set-DbaNetworkCertificate.Tests.ps1 @@ -10,22 +10,22 @@ Describe "Set-DbaNetworkCertificate" { $CommandUnderTest = Get-Command Set-DbaNetworkCertificate } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Certificate as a parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type X509Certificate2 + $CommandUnderTest | Should -HaveParameter Certificate -Type System.Security.Cryptography.X509Certificates.X509Certificate2 } It "Should have Thumbprint as a parameter" { - $CommandUnderTest | Should -HaveParameter Thumbprint -Type String + $CommandUnderTest | Should -HaveParameter Thumbprint -Type System.String } It "Should have RestartService as a switch parameter" { - $CommandUnderTest | Should -HaveParameter RestartService -Type Switch + $CommandUnderTest | Should -HaveParameter RestartService -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaNetworkConfiguration.Tests.ps1 b/tests/Set-DbaNetworkConfiguration.Tests.ps1 index 27de72a0dd..878b0670f1 100644 --- a/tests/Set-DbaNetworkConfiguration.Tests.ps1 +++ b/tests/Set-DbaNetworkConfiguration.Tests.ps1 @@ -9,35 +9,35 @@ Describe "Set-DbaNetworkConfiguration" { BeforeAll { $CommandUnderTest = Get-Command Set-DbaNetworkConfiguration } - 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 Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have EnableProtocol as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter EnableProtocol -Type String -Mandatory:$false + It "Should have EnableProtocol as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter EnableProtocol -Type System.String -Mandatory:$false } - It "Should have DisableProtocol as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter DisableProtocol -Type String -Mandatory:$false + It "Should have DisableProtocol as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter DisableProtocol -Type System.String -Mandatory:$false } It "Should have DynamicPortForIPAll as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter DynamicPortForIPAll -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DynamicPortForIPAll -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have StaticPortForIPAll as a non-mandatory parameter of type Int32[]" { - $CommandUnderTest | Should -HaveParameter StaticPortForIPAll -Type Int32[] -Mandatory:$false + It "Should have StaticPortForIPAll as a non-mandatory parameter of type System.Int32[]" { + $CommandUnderTest | Should -HaveParameter StaticPortForIPAll -Type System.Int32[] -Mandatory:$false } - It "Should have IpAddress as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter IpAddress -Type String[] -Mandatory:$false + It "Should have IpAddress as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter IpAddress -Type System.String[] -Mandatory:$false } It "Should have RestartService as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter RestartService -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RestartService -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -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 } } diff --git a/tests/Set-DbaPowerPlan.Tests.ps1 b/tests/Set-DbaPowerPlan.Tests.ps1 index b635470eb7..6dd6992820 100644 --- a/tests/Set-DbaPowerPlan.Tests.ps1 +++ b/tests/Set-DbaPowerPlan.Tests.ps1 @@ -12,10 +12,10 @@ Describe "Set-DbaPowerPlan" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential } It "Should have PowerPlan as a parameter" { - $CommandUnderTest | Should -HaveParameter PowerPlan -Type String + $CommandUnderTest | Should -HaveParameter PowerPlan -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaPrivilege.Tests.ps1 b/tests/Set-DbaPrivilege.Tests.ps1 index 75369801e6..e908b876b2 100644 --- a/tests/Set-DbaPrivilege.Tests.ps1 +++ b/tests/Set-DbaPrivilege.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Set-DbaPrivilege" { $CommandUnderTest = Get-Command Set-DbaPrivilege } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have User as a parameter" { - $CommandUnderTest | Should -HaveParameter User -Type String + $CommandUnderTest | Should -HaveParameter User -Type System.String } } } diff --git a/tests/Set-DbaResourceGovernor.Tests.ps1 b/tests/Set-DbaResourceGovernor.Tests.ps1 index 436edb381c..09820e8cd1 100644 --- a/tests/Set-DbaResourceGovernor.Tests.ps1 +++ b/tests/Set-DbaResourceGovernor.Tests.ps1 @@ -6,10 +6,10 @@ Describe "Set-DbaResourceGovernor" { $CommandUnderTest = Get-Command Set-DbaResourceGovernor } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Enabled as a switch parameter" { $CommandUnderTest | Should -HaveParameter Enabled -Type switch @@ -18,7 +18,7 @@ Describe "Set-DbaResourceGovernor" { $CommandUnderTest | Should -HaveParameter Disabled -Type switch } It "Should have ClassifierFunction as a parameter" { - $CommandUnderTest | Should -HaveParameter ClassifierFunction -Type string + $CommandUnderTest | Should -HaveParameter ClassifierFunction -Type System.String } It "Should have EnableException as a switch parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type switch diff --git a/tests/Set-DbaRgResourcePool.Tests.ps1 b/tests/Set-DbaRgResourcePool.Tests.ps1 index 5d32e839f4..4843ff8790 100644 --- a/tests/Set-DbaRgResourcePool.Tests.ps1 +++ b/tests/Set-DbaRgResourcePool.Tests.ps1 @@ -41,7 +41,7 @@ Describe "Set-DbaRgResourcePool" { $CommandUnderTest | Should -HaveParameter MaximumProcesses -Type Int32 -Mandatory:$false } It "Should have SkipReconfigure parameter" { - $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false diff --git a/tests/Set-DbaRgWorkloadGroup.Tests.ps1 b/tests/Set-DbaRgWorkloadGroup.Tests.ps1 index 0062129aed..a99adc7727 100644 --- a/tests/Set-DbaRgWorkloadGroup.Tests.ps1 +++ b/tests/Set-DbaRgWorkloadGroup.Tests.ps1 @@ -10,46 +10,46 @@ Describe "Set-DbaRgWorkloadGroup" { $CommandUnderTest = Get-Command Set-DbaRgWorkloadGroup } 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 WorkloadGroup parameter" { - $CommandUnderTest | Should -HaveParameter WorkloadGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WorkloadGroup -Type System.String[] -Mandatory:$false } It "Should have ResourcePool parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePool -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResourcePool -Type System.String -Mandatory:$false } It "Should have ResourcePoolType parameter" { - $CommandUnderTest | Should -HaveParameter ResourcePoolType -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ResourcePoolType -Type System.String -Mandatory:$false } It "Should have Importance parameter" { - $CommandUnderTest | Should -HaveParameter Importance -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Importance -Type System.String -Mandatory:$false } It "Should have RequestMaximumMemoryGrantPercentage parameter" { - $CommandUnderTest | Should -HaveParameter RequestMaximumMemoryGrantPercentage -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RequestMaximumMemoryGrantPercentage -Type System.Int32 -Mandatory:$false } It "Should have RequestMaximumCpuTimeInSeconds parameter" { - $CommandUnderTest | Should -HaveParameter RequestMaximumCpuTimeInSeconds -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RequestMaximumCpuTimeInSeconds -Type System.Int32 -Mandatory:$false } It "Should have RequestMemoryGrantTimeoutInSeconds parameter" { - $CommandUnderTest | Should -HaveParameter RequestMemoryGrantTimeoutInSeconds -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RequestMemoryGrantTimeoutInSeconds -Type System.Int32 -Mandatory:$false } It "Should have MaximumDegreeOfParallelism parameter" { - $CommandUnderTest | Should -HaveParameter MaximumDegreeOfParallelism -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumDegreeOfParallelism -Type System.Int32 -Mandatory:$false } It "Should have GroupMaximumRequests parameter" { - $CommandUnderTest | Should -HaveParameter GroupMaximumRequests -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter GroupMaximumRequests -Type System.Int32 -Mandatory:$false } It "Should have SkipReconfigure parameter" { - $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SkipReconfigure -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type WorkloadGroup[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.WorkloadGroup[] -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 } } diff --git a/tests/Set-DbaSpConfigure.Tests.ps1 b/tests/Set-DbaSpConfigure.Tests.ps1 index 9f1be5d41f..cb826d31c8 100644 --- a/tests/Set-DbaSpConfigure.Tests.ps1 +++ b/tests/Set-DbaSpConfigure.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Set-DbaSpConfigure" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Value as a parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type Int32 + $CommandUnderTest | Should -HaveParameter Value -Type System.Int32 } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaSpn.Tests.ps1 b/tests/Set-DbaSpn.Tests.ps1 index 7efd86d067..4e9304bbe5 100644 --- a/tests/Set-DbaSpn.Tests.ps1 +++ b/tests/Set-DbaSpn.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Set-DbaSpn" { $CommandUnderTest = Get-Command Set-DbaSpn } It "Should have SPN as a parameter" { - $CommandUnderTest | Should -HaveParameter SPN -Type String + $CommandUnderTest | Should -HaveParameter SPN -Type System.String } It "Should have ServiceAccount as a parameter" { - $CommandUnderTest | Should -HaveParameter ServiceAccount -Type String + $CommandUnderTest | Should -HaveParameter ServiceAccount -Type System.String } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have NoDelegation as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoDelegation -Type Switch + $CommandUnderTest | Should -HaveParameter NoDelegation -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaStartupParameter.Tests.ps1 b/tests/Set-DbaStartupParameter.Tests.ps1 index a10a6651fc..441d422301 100644 --- a/tests/Set-DbaStartupParameter.Tests.ps1 +++ b/tests/Set-DbaStartupParameter.Tests.ps1 @@ -25,58 +25,58 @@ Describe "Set-DbaStartupParameter" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential } It "Should have MasterData as a parameter" { - $CommandUnderTest | Should -HaveParameter MasterData -Type String + $CommandUnderTest | Should -HaveParameter MasterData -Type System.String } It "Should have MasterLog as a parameter" { - $CommandUnderTest | Should -HaveParameter MasterLog -Type String + $CommandUnderTest | Should -HaveParameter MasterLog -Type System.String } It "Should have ErrorLog as a parameter" { - $CommandUnderTest | Should -HaveParameter ErrorLog -Type String + $CommandUnderTest | Should -HaveParameter ErrorLog -Type System.String } It "Should have TraceFlag as a parameter" { - $CommandUnderTest | Should -HaveParameter TraceFlag -Type String[] + $CommandUnderTest | Should -HaveParameter TraceFlag -Type System.String[] } It "Should have CommandPromptStart as a switch parameter" { - $CommandUnderTest | Should -HaveParameter CommandPromptStart -Type Switch + $CommandUnderTest | Should -HaveParameter CommandPromptStart -Type System.Management.Automation.SwitchParameter } It "Should have MinimalStart as a switch parameter" { - $CommandUnderTest | Should -HaveParameter MinimalStart -Type Switch + $CommandUnderTest | Should -HaveParameter MinimalStart -Type System.Management.Automation.SwitchParameter } It "Should have MemoryToReserve as a parameter" { - $CommandUnderTest | Should -HaveParameter MemoryToReserve -Type Int32 + $CommandUnderTest | Should -HaveParameter MemoryToReserve -Type System.Int32 } It "Should have SingleUser as a switch parameter" { - $CommandUnderTest | Should -HaveParameter SingleUser -Type Switch + $CommandUnderTest | Should -HaveParameter SingleUser -Type System.Management.Automation.SwitchParameter } It "Should have SingleUserDetails as a parameter" { - $CommandUnderTest | Should -HaveParameter SingleUserDetails -Type String + $CommandUnderTest | Should -HaveParameter SingleUserDetails -Type System.String } It "Should have NoLoggingToWinEvents as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoLoggingToWinEvents -Type Switch + $CommandUnderTest | Should -HaveParameter NoLoggingToWinEvents -Type System.Management.Automation.SwitchParameter } It "Should have StartAsNamedInstance as a switch parameter" { - $CommandUnderTest | Should -HaveParameter StartAsNamedInstance -Type Switch + $CommandUnderTest | Should -HaveParameter StartAsNamedInstance -Type System.Management.Automation.SwitchParameter } It "Should have DisableMonitoring as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DisableMonitoring -Type Switch + $CommandUnderTest | Should -HaveParameter DisableMonitoring -Type System.Management.Automation.SwitchParameter } It "Should have IncreasedExtents as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncreasedExtents -Type Switch + $CommandUnderTest | Should -HaveParameter IncreasedExtents -Type System.Management.Automation.SwitchParameter } It "Should have TraceFlagOverride as a switch parameter" { - $CommandUnderTest | Should -HaveParameter TraceFlagOverride -Type Switch + $CommandUnderTest | Should -HaveParameter TraceFlagOverride -Type System.Management.Automation.SwitchParameter } It "Should have StartupConfig as a parameter" { $CommandUnderTest | Should -HaveParameter StartupConfig -Type Object } It "Should have Offline as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Offline -Type Switch + $CommandUnderTest | Should -HaveParameter Offline -Type System.Management.Automation.SwitchParameter } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaTcpPort.Tests.ps1 b/tests/Set-DbaTcpPort.Tests.ps1 index 8df8ed7931..7e566cce5a 100644 --- a/tests/Set-DbaTcpPort.Tests.ps1 +++ b/tests/Set-DbaTcpPort.Tests.ps1 @@ -18,16 +18,16 @@ Describe "Set-DbaTcpPort" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential } It "Should have Port as a parameter" { - $CommandUnderTest | Should -HaveParameter Port -Type Int32[] + $CommandUnderTest | Should -HaveParameter Port -Type System.Int32[] } It "Should have IpAddress as a parameter" { - $CommandUnderTest | Should -HaveParameter IpAddress -Type IPAddress[] + $CommandUnderTest | Should -HaveParameter IpAddress -Type System.Net.IPAddress[] } It "Should have Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbaTempDbConfig.Tests.ps1 b/tests/Set-DbaTempDbConfig.Tests.ps1 index 1782a3bbe8..727978bca9 100644 --- a/tests/Set-DbaTempDbConfig.Tests.ps1 +++ b/tests/Set-DbaTempDbConfig.Tests.ps1 @@ -31,43 +31,43 @@ Describe "Set-DbaTempDbConfig" { $CommandUnderTest = Get-Command Set-DbaTempDbConfig } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have DataFileCount as a parameter" { - $CommandUnderTest | Should -HaveParameter DataFileCount -Type Int32 + $CommandUnderTest | Should -HaveParameter DataFileCount -Type System.Int32 } It "Should have DataFileSize as a parameter" { - $CommandUnderTest | Should -HaveParameter DataFileSize -Type Int32 + $CommandUnderTest | Should -HaveParameter DataFileSize -Type System.Int32 } It "Should have LogFileSize as a parameter" { - $CommandUnderTest | Should -HaveParameter LogFileSize -Type Int32 + $CommandUnderTest | Should -HaveParameter LogFileSize -Type System.Int32 } It "Should have DataFileGrowth as a parameter" { - $CommandUnderTest | Should -HaveParameter DataFileGrowth -Type Int32 + $CommandUnderTest | Should -HaveParameter DataFileGrowth -Type System.Int32 } It "Should have LogFileGrowth as a parameter" { - $CommandUnderTest | Should -HaveParameter LogFileGrowth -Type Int32 + $CommandUnderTest | Should -HaveParameter LogFileGrowth -Type System.Int32 } It "Should have DataPath as a parameter" { - $CommandUnderTest | Should -HaveParameter DataPath -Type String[] + $CommandUnderTest | Should -HaveParameter DataPath -Type System.String[] } It "Should have LogPath as a parameter" { - $CommandUnderTest | Should -HaveParameter LogPath -Type String + $CommandUnderTest | Should -HaveParameter LogPath -Type System.String } It "Should have OutFile as a parameter" { - $CommandUnderTest | Should -HaveParameter OutFile -Type String + $CommandUnderTest | Should -HaveParameter OutFile -Type System.String } It "Should have OutputScriptOnly as a parameter" { - $CommandUnderTest | Should -HaveParameter OutputScriptOnly -Type Switch + $CommandUnderTest | Should -HaveParameter OutputScriptOnly -Type System.Management.Automation.SwitchParameter } It "Should have DisableGrowth as a parameter" { - $CommandUnderTest | Should -HaveParameter DisableGrowth -Type Switch + $CommandUnderTest | Should -HaveParameter DisableGrowth -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Set-DbatoolsConfig.Tests.ps1 b/tests/Set-DbatoolsConfig.Tests.ps1 index 84b30e876a..c61544be76 100644 --- a/tests/Set-DbatoolsConfig.Tests.ps1 +++ b/tests/Set-DbatoolsConfig.Tests.ps1 @@ -5,62 +5,62 @@ Describe "Set-DbatoolsConfig" { BeforeAll { $CommandUnderTest = Get-Command Set-DbatoolsConfig } - It "Should have FullName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter FullName -Type String -Mandatory:$false + It "Should have FullName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter FullName -Type System.String -Mandatory:$false } - It "Should have Module as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Module -Type String -Mandatory:$false + It "Should have Module as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Module -Type System.String -Mandatory:$false } - It "Should have Name as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + It "Should have Name as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Name -Type System.String -Mandatory:$false } - It "Should have Value as a non-mandatory Object parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type Object -Mandatory:$false + It "Should have Value as a non-mandatory System.Object parameter" { + $CommandUnderTest | Should -HaveParameter Value -Type System.Object -Mandatory:$false } - It "Should have PersistedValue as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter PersistedValue -Type String -Mandatory:$false + It "Should have PersistedValue as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter PersistedValue -Type System.String -Mandatory:$false } - It "Should have PersistedType as a non-mandatory ConfigurationValueType parameter" { - $CommandUnderTest | Should -HaveParameter PersistedType -Type ConfigurationValueType -Mandatory:$false + It "Should have PersistedType as a non-mandatory Dataplat.Dbatools.Configuration.ConfigurationValueType parameter" { + $CommandUnderTest | Should -HaveParameter PersistedType -Type Dataplat.Dbatools.Configuration.ConfigurationValueType -Mandatory:$false } - It "Should have Description as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Description -Type String -Mandatory:$false + It "Should have Description as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Description -Type System.String -Mandatory:$false } - It "Should have Validation as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Validation -Type String -Mandatory:$false + It "Should have Validation as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Validation -Type System.String -Mandatory:$false } - It "Should have Handler as a non-mandatory ScriptBlock parameter" { - $CommandUnderTest | Should -HaveParameter Handler -Type ScriptBlock -Mandatory:$false + It "Should have Handler as a non-mandatory System.Management.Automation.ScriptBlock parameter" { + $CommandUnderTest | Should -HaveParameter Handler -Type System.Management.Automation.ScriptBlock -Mandatory:$false } - It "Should have Hidden as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Hidden -Type Switch -Mandatory:$false + It "Should have Hidden as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Hidden -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have Default as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Default -Type Switch -Mandatory:$false + It "Should have Default as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Default -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have Initialize as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Initialize -Type Switch -Mandatory:$false + It "Should have Initialize as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Initialize -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have SimpleExport as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter SimpleExport -Type Switch -Mandatory:$false + It "Should have SimpleExport as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter SimpleExport -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have ModuleExport as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter ModuleExport -Type Switch -Mandatory:$false + It "Should have ModuleExport as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter ModuleExport -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have DisableValidation as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter DisableValidation -Type Switch -Mandatory:$false + It "Should have DisableValidation as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter DisableValidation -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have DisableHandler as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter DisableHandler -Type Switch -Mandatory:$false + It "Should have DisableHandler as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter DisableHandler -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have PassThru as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter PassThru -Type Switch -Mandatory:$false + It "Should have PassThru as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter PassThru -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have Register as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Register -Type Switch -Mandatory:$false + It "Should have Register as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Register -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Set-DbatoolsInsecureConnection.Tests.ps1 b/tests/Set-DbatoolsInsecureConnection.Tests.ps1 index 5ea98c562f..eae6eca44c 100644 --- a/tests/Set-DbatoolsInsecureConnection.Tests.ps1 +++ b/tests/Set-DbatoolsInsecureConnection.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Set-DbatoolsInsecureConnection" { $CommandUnderTest = Get-Command Set-DbatoolsInsecureConnection } It "Should have SessionOnly as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter SessionOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SessionOnly -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Scope as a non-mandatory ConfigScope parameter" { - $CommandUnderTest | Should -HaveParameter Scope -Type ConfigScope -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Scope -Type Dataplat.Dbatools.Configuration.ConfigScope -Mandatory:$false } It "Should have Register as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Register -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Register -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Set-DbatoolsPath.Tests.ps1 b/tests/Set-DbatoolsPath.Tests.ps1 index fdb889a32b..86d30596c6 100644 --- a/tests/Set-DbatoolsPath.Tests.ps1 +++ b/tests/Set-DbatoolsPath.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Set-DbatoolsPath" { $CommandUnderTest = Get-Command Set-DbatoolsPath } It "Should have Name as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Name -Type System.String -Mandatory:$false } It "Should have Path as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } It "Should have Register as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Register -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Register -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Scope as a non-mandatory ConfigScope parameter" { - $CommandUnderTest | Should -HaveParameter Scope -Type ConfigScope -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Scope -Type Dataplat.Dbatools.Configuration.ConfigScope -Mandatory:$false } } } diff --git a/tests/Show-DbaDbList.Tests.ps1 b/tests/Show-DbaDbList.Tests.ps1 index b69599d778..ee33e6dca1 100644 --- a/tests/Show-DbaDbList.Tests.ps1 +++ b/tests/Show-DbaDbList.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Show-DbaDbList" { $CommandUnderTest = Get-Command Show-DbaDbList } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Title as a parameter" { - $CommandUnderTest | Should -HaveParameter Title -Type String + $CommandUnderTest | Should -HaveParameter Title -Type System.String } It "Should have Header as a parameter" { - $CommandUnderTest | Should -HaveParameter Header -Type String + $CommandUnderTest | Should -HaveParameter Header -Type System.String } It "Should have DefaultDb as a parameter" { - $CommandUnderTest | Should -HaveParameter DefaultDb -Type String + $CommandUnderTest | Should -HaveParameter DefaultDb -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Show-DbaInstanceFileSystem.Tests.ps1 b/tests/Show-DbaInstanceFileSystem.Tests.ps1 index d8eeca6d21..31988d425f 100644 --- a/tests/Show-DbaInstanceFileSystem.Tests.ps1 +++ b/tests/Show-DbaInstanceFileSystem.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Show-DbaInstanceFileSystem" { $CommandUnderTest = Get-Command Show-DbaInstanceFileSystem } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Start-DbaAgentJob.Tests.ps1 b/tests/Start-DbaAgentJob.Tests.ps1 index 4a1a82d758..7b39d093f2 100644 --- a/tests/Start-DbaAgentJob.Tests.ps1 +++ b/tests/Start-DbaAgentJob.Tests.ps1 @@ -12,34 +12,34 @@ Describe "Start-DbaAgentJob" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Job parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type String[] + $CommandUnderTest | Should -HaveParameter Job -Type System.String[] } It "Should have StepName parameter" { - $CommandUnderTest | Should -HaveParameter StepName -Type String + $CommandUnderTest | Should -HaveParameter StepName -Type System.String } It "Should have ExcludeJob parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeJob -Type System.String[] } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Job[] } It "Should have AllJobs parameter" { - $CommandUnderTest | Should -HaveParameter AllJobs -Type Switch + $CommandUnderTest | Should -HaveParameter AllJobs -Type System.Management.Automation.SwitchParameter } It "Should have Wait parameter" { - $CommandUnderTest | Should -HaveParameter Wait -Type Switch + $CommandUnderTest | Should -HaveParameter Wait -Type System.Management.Automation.SwitchParameter } It "Should have Parallel parameter" { - $CommandUnderTest | Should -HaveParameter Parallel -Type Switch + $CommandUnderTest | Should -HaveParameter Parallel -Type System.Management.Automation.SwitchParameter } It "Should have WaitPeriod parameter" { - $CommandUnderTest | Should -HaveParameter WaitPeriod -Type Int32 + $CommandUnderTest | Should -HaveParameter WaitPeriod -Type System.Int32 } It "Should have SleepPeriod parameter" { - $CommandUnderTest | Should -HaveParameter SleepPeriod -Type Int32 + $CommandUnderTest | Should -HaveParameter SleepPeriod -Type System.Int32 } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Start-DbaDbEncryption.Tests.ps1 b/tests/Start-DbaDbEncryption.Tests.ps1 index d616e0b6da..48b57fda1c 100644 --- a/tests/Start-DbaDbEncryption.Tests.ps1 +++ b/tests/Start-DbaDbEncryption.Tests.ps1 @@ -22,52 +22,52 @@ Describe "Start-DbaDbEncryption" { $CommandUnderTest = Get-Command Start-DbaDbEncryption } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.Credential } It "Should have EncryptorName as a parameter" { - $CommandUnderTest | Should -HaveParameter EncryptorName -Type String + $CommandUnderTest | Should -HaveParameter EncryptorName -Type System.String } It "Should have EncryptorType as a parameter" { - $CommandUnderTest | Should -HaveParameter EncryptorType -Type String + $CommandUnderTest | Should -HaveParameter EncryptorType -Type System.String } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have BackupPath as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupPath -Type String + $CommandUnderTest | Should -HaveParameter BackupPath -Type System.String } It "Should have MasterKeySecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter MasterKeySecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter MasterKeySecurePassword -Type System.Security.SecureString } It "Should have CertificateSubject as a parameter" { - $CommandUnderTest | Should -HaveParameter CertificateSubject -Type String + $CommandUnderTest | Should -HaveParameter CertificateSubject -Type System.String } It "Should have CertificateStartDate as a parameter" { - $CommandUnderTest | Should -HaveParameter CertificateStartDate -Type DateTime + $CommandUnderTest | Should -HaveParameter CertificateStartDate -Type System.DateTime } It "Should have CertificateExpirationDate as a parameter" { - $CommandUnderTest | Should -HaveParameter CertificateExpirationDate -Type DateTime + $CommandUnderTest | Should -HaveParameter CertificateExpirationDate -Type System.DateTime } It "Should have CertificateActiveForServiceBrokerDialog as a parameter" { - $CommandUnderTest | Should -HaveParameter CertificateActiveForServiceBrokerDialog -Type Switch + $CommandUnderTest | Should -HaveParameter CertificateActiveForServiceBrokerDialog -Type System.Management.Automation.SwitchParameter } It "Should have BackupSecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupSecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter BackupSecurePassword -Type System.Security.SecureString } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have AllUserDatabases as a parameter" { - $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type System.Management.Automation.SwitchParameter } It "Should have Force as a parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Start-DbaEndpoint.Tests.ps1 b/tests/Start-DbaEndpoint.Tests.ps1 index b7febe3bab..acf5895f2d 100644 --- a/tests/Start-DbaEndpoint.Tests.ps1 +++ b/tests/Start-DbaEndpoint.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Start-DbaEndpoint" { $CommandUnderTest = Get-Command Start-DbaEndpoint } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Endpoint as a parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String[] + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String[] } It "Should have AllEndpoints as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllEndpoints -Type Switch + $CommandUnderTest | Should -HaveParameter AllEndpoints -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Endpoint[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Endpoint[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Start-DbaMigration.Tests.ps1 b/tests/Start-DbaMigration.Tests.ps1 index 770168b10f..042125d20c 100644 --- a/tests/Start-DbaMigration.Tests.ps1 +++ b/tests/Start-DbaMigration.Tests.ps1 @@ -45,7 +45,7 @@ Describe "Start-DbaMigration" { $CommandUnderTest | Should -HaveParameter BackupRestore -Type switch } It "Should have SharedPath as a string parameter" { - $CommandUnderTest | Should -HaveParameter SharedPath -Type string + $CommandUnderTest | Should -HaveParameter SharedPath -Type System.String } It "Should have WithReplace as a switch parameter" { $CommandUnderTest | Should -HaveParameter WithReplace -Type switch @@ -63,13 +63,13 @@ Describe "Start-DbaMigration" { $CommandUnderTest | Should -HaveParameter IncludeSupportDbs -Type switch } It "Should have SourceSqlCredential as a PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter SourceSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SourceSqlCredential -Type System.Management.Automation.PSCredential } It "Should have DestinationSqlCredential as a PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Exclude as a string array parameter" { - $CommandUnderTest | Should -HaveParameter Exclude -Type string[] + $CommandUnderTest | Should -HaveParameter Exclude -Type System.String[] } It "Should have DisableJobsOnDestination as a switch parameter" { $CommandUnderTest | Should -HaveParameter DisableJobsOnDestination -Type switch @@ -96,10 +96,10 @@ Describe "Start-DbaMigration" { $CommandUnderTest | Should -HaveParameter Force -Type switch } It "Should have AzureCredential as a string parameter" { - $CommandUnderTest | Should -HaveParameter AzureCredential -Type string + $CommandUnderTest | Should -HaveParameter AzureCredential -Type System.String } It "Should have MasterKeyPassword as a SecureString parameter" { - $CommandUnderTest | Should -HaveParameter MasterKeyPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter MasterKeyPassword -Type System.Security.SecureString } It "Should have EnableException as a switch parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type switch diff --git a/tests/Start-DbaPfDataCollectorSet.Tests.ps1 b/tests/Start-DbaPfDataCollectorSet.Tests.ps1 index ab7a6f6795..d6a3e90639 100644 --- a/tests/Start-DbaPfDataCollectorSet.Tests.ps1 +++ b/tests/Start-DbaPfDataCollectorSet.Tests.ps1 @@ -5,23 +5,23 @@ Describe "Start-DbaPfDataCollectorSet" { BeforeAll { $CommandUnderTest = Get-Command Start-DbaPfDataCollectorSet } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Credential[]" { + $CommandUnderTest | Should -HaveParameter Credential -Type Microsoft.SqlServer.Management.Smo.Credential -Mandatory:$false } - It "Should have CollectorSet as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter CollectorSet -Type String[] -Mandatory:$false + It "Should have CollectorSet as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter CollectorSet -Type System.String[] -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have NoWait as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NoWait -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoWait -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 } } diff --git a/tests/Start-DbaService.Tests.ps1 b/tests/Start-DbaService.Tests.ps1 index 8efb10aeda..238ed5a391 100644 --- a/tests/Start-DbaService.Tests.ps1 +++ b/tests/Start-DbaService.Tests.ps1 @@ -13,25 +13,25 @@ Describe "Start-DbaService" { $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have InstanceName parameter" { - $CommandUnderTest | Should -HaveParameter InstanceName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InstanceName -Type System.String[] -Mandatory:$false } It "Should have SqlInstance parameter" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have Type parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have Timeout parameter" { - $CommandUnderTest | Should -HaveParameter Timeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Timeout -Type System.Int32 -Mandatory:$false } It "Should have Credential parameter" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Start-DbaTrace.Tests.ps1 b/tests/Start-DbaTrace.Tests.ps1 index e692a80be3..49cf2ff0ba 100644 --- a/tests/Start-DbaTrace.Tests.ps1 +++ b/tests/Start-DbaTrace.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Start-DbaTrace" { $CommandUnderTest = Get-Command Start-DbaTrace } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Id as a parameter" { - $CommandUnderTest | Should -HaveParameter Id -Type Int32[] + $CommandUnderTest | Should -HaveParameter Id -Type System.Int32[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Start-DbaXESession.Tests.ps1 b/tests/Start-DbaXESession.Tests.ps1 index 38e146c71e..5db4edadae 100644 --- a/tests/Start-DbaXESession.Tests.ps1 +++ b/tests/Start-DbaXESession.Tests.ps1 @@ -42,28 +42,28 @@ Describe "Start-DbaXESession" { $CommandUnderTest = Get-Command Start-DbaXESession } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Session as a parameter" { - $CommandUnderTest | Should -HaveParameter Session -Type Object[] + $CommandUnderTest | Should -HaveParameter Session -Type System.Object[] } It "Should have StartAt as a parameter" { - $CommandUnderTest | Should -HaveParameter StartAt -Type DateTime + $CommandUnderTest | Should -HaveParameter StartAt -Type System.DateTime } It "Should have StopAt as a parameter" { - $CommandUnderTest | Should -HaveParameter StopAt -Type DateTime + $CommandUnderTest | Should -HaveParameter StopAt -Type System.DateTime } It "Should have AllSessions as a parameter" { - $CommandUnderTest | Should -HaveParameter AllSessions -Type Switch + $CommandUnderTest | Should -HaveParameter AllSessions -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Session[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Start-DbaXESmartTarget.Tests.ps1 b/tests/Start-DbaXESmartTarget.Tests.ps1 index 8eed328bef..4e9c06fd82 100644 --- a/tests/Start-DbaXESmartTarget.Tests.ps1 +++ b/tests/Start-DbaXESmartTarget.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Start-DbaXESmartTarget" { $CommandUnderTest = Get-Command Start-DbaXESmartTarget } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String -Mandatory:$false } It "Should have Session parameter" { - $CommandUnderTest | Should -HaveParameter Session -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Session -Type System.String -Mandatory:$false } It "Should have FailOnProcessingError parameter" { - $CommandUnderTest | Should -HaveParameter FailOnProcessingError -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FailOnProcessingError -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Responder parameter" { - $CommandUnderTest | Should -HaveParameter Responder -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Responder -Type System.Object[] -Mandatory:$false } It "Should have Template parameter" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Template -Type System.String[] -Mandatory:$false } It "Should have NotAsJob parameter" { - $CommandUnderTest | Should -HaveParameter NotAsJob -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NotAsJob -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Stop-DbaAgentJob.Tests.ps1 b/tests/Stop-DbaAgentJob.Tests.ps1 index c5abbdb98e..2cfe8a774d 100644 --- a/tests/Stop-DbaAgentJob.Tests.ps1 +++ b/tests/Stop-DbaAgentJob.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Stop-DbaAgentJob" { $CommandUnderTest = Get-Command Stop-DbaAgentJob } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type String[] + $CommandUnderTest | Should -HaveParameter Job -Type System.String[] } It "Should have ExcludeJob as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeJob -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Job[] } It "Should have Wait as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Wait -Type Switch + $CommandUnderTest | Should -HaveParameter Wait -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Stop-DbaDbEncryption.Tests.ps1 b/tests/Stop-DbaDbEncryption.Tests.ps1 index e2dae2c206..0bca878c17 100644 --- a/tests/Stop-DbaDbEncryption.Tests.ps1 +++ b/tests/Stop-DbaDbEncryption.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Stop-DbaDbEncryption" { $CommandUnderTest = Get-Command Stop-DbaDbEncryption } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Stop-DbaEndpoint.Tests.ps1 b/tests/Stop-DbaEndpoint.Tests.ps1 index 1759112992..90046b9b8e 100644 --- a/tests/Stop-DbaEndpoint.Tests.ps1 +++ b/tests/Stop-DbaEndpoint.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Stop-DbaEndpoint" { $CommandUnderTest = Get-Command Stop-DbaEndpoint } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Endpoint as a parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String[] + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String[] } It "Should have AllEndpoints as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllEndpoints -Type Switch + $CommandUnderTest | Should -HaveParameter AllEndpoints -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Endpoint[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Endpoint[] } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Stop-DbaPfDataCollectorSet.Tests.ps1 b/tests/Stop-DbaPfDataCollectorSet.Tests.ps1 index f7d9237da5..1e7efc90fe 100644 --- a/tests/Stop-DbaPfDataCollectorSet.Tests.ps1 +++ b/tests/Stop-DbaPfDataCollectorSet.Tests.ps1 @@ -5,22 +5,22 @@ Describe "Stop-DbaPfDataCollectorSet" { $CommandUnderTest = Get-Command Stop-DbaPfDataCollectorSet } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have CollectorSet as a parameter" { - $CommandUnderTest | Should -HaveParameter CollectorSet -Type String[] + $CommandUnderTest | Should -HaveParameter CollectorSet -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have NoWait as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoWait -Type Switch + $CommandUnderTest | Should -HaveParameter NoWait -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Stop-DbaProcess.Tests.ps1 b/tests/Stop-DbaProcess.Tests.ps1 index 3359dcf70b..2a826fee79 100644 --- a/tests/Stop-DbaProcess.Tests.ps1 +++ b/tests/Stop-DbaProcess.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Stop-DbaProcess" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Spid as a parameter" { - $CommandUnderTest | Should -HaveParameter Spid -Type Int32[] + $CommandUnderTest | Should -HaveParameter Spid -Type System.Int32[] } It "Should have ExcludeSpid as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSpid -Type Int32[] + $CommandUnderTest | Should -HaveParameter ExcludeSpid -Type System.Int32[] } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have Hostname as a parameter" { - $CommandUnderTest | Should -HaveParameter Hostname -Type String[] + $CommandUnderTest | Should -HaveParameter Hostname -Type System.String[] } It "Should have Program as a parameter" { - $CommandUnderTest | Should -HaveParameter Program -Type String[] + $CommandUnderTest | Should -HaveParameter Program -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Stop-DbaService.Tests.ps1 b/tests/Stop-DbaService.Tests.ps1 index a17007aa0d..caeae5e892 100644 --- a/tests/Stop-DbaService.Tests.ps1 +++ b/tests/Stop-DbaService.Tests.ps1 @@ -15,28 +15,28 @@ Describe "Stop-DbaService" { $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have InstanceName as a parameter" { - $CommandUnderTest | Should -HaveParameter InstanceName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InstanceName -Type System.String[] -Mandatory:$false } It "Should have SqlInstance as a parameter" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have Timeout as a parameter" { - $CommandUnderTest | Should -HaveParameter Timeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Timeout -Type System.Int32 -Mandatory:$false } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Force as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Stop-DbaTrace.Tests.ps1 b/tests/Stop-DbaTrace.Tests.ps1 index d3a1ed501f..2caa718a3e 100644 --- a/tests/Stop-DbaTrace.Tests.ps1 +++ b/tests/Stop-DbaTrace.Tests.ps1 @@ -11,19 +11,19 @@ Describe "Stop-DbaTrace Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Stop-DbaTrace } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Id as a parameter" { - $CommandUnderTest | Should -HaveParameter Id -Type Int32[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Id -Type System.Int32[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Stop-DbaXESession.Tests.ps1 b/tests/Stop-DbaXESession.Tests.ps1 index d920caad57..fc1f54b790 100644 --- a/tests/Stop-DbaXESession.Tests.ps1 +++ b/tests/Stop-DbaXESession.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Stop-DbaXESession" { $CommandUnderTest = Get-Command Stop-DbaXESession } 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 Session parameter" { - $CommandUnderTest | Should -HaveParameter Session -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Session -Type System.Object[] -Mandatory:$false } It "Should have AllSessions parameter" { - $CommandUnderTest | Should -HaveParameter AllSessions -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllSessions -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Session[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Stop-DbaXESmartTarget.Tests.ps1 b/tests/Stop-DbaXESmartTarget.Tests.ps1 index e3964747b5..ba027acfe6 100644 --- a/tests/Stop-DbaXESmartTarget.Tests.ps1 +++ b/tests/Stop-DbaXESmartTarget.Tests.ps1 @@ -6,10 +6,10 @@ Describe "Stop-DbaXESmartTarget" { $CommandUnderTest = Get-Command Stop-DbaXESmartTarget } It "Accepts InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Accepts EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Stop-Function.Tests.ps1 b/tests/Stop-Function.Tests.ps1 index 214d3b4cae..d9a1a3da51 100644 --- a/tests/Stop-Function.Tests.ps1 +++ b/tests/Stop-Function.Tests.ps1 @@ -10,47 +10,47 @@ Describe "Stop-Function" { BeforeAll { $CommandUnderTest = Get-Command Stop-Function } - It "Should have Message as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Message -Type String -Mandatory:$false + It "Should have Message as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Message -Type System.String -Mandatory:$false } - It "Should have EnableException as a non-mandatory Boolean parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Boolean -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Boolean parameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Boolean -Mandatory:$false } - It "Should have Category as a non-mandatory ErrorCategory parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type ErrorCategory -Mandatory:$false + It "Should have Category as a non-mandatory System.Management.Automation.ErrorCategory parameter" { + $CommandUnderTest | Should -HaveParameter Category -Type System.Management.Automation.ErrorCategory -Mandatory:$false } - It "Should have ErrorRecord as a non-mandatory ErrorRecord[] parameter" { - $CommandUnderTest | Should -HaveParameter ErrorRecord -Type ErrorRecord[] -Mandatory:$false + It "Should have ErrorRecord as a non-mandatory System.Management.Automation.ErrorRecord[] parameter" { + $CommandUnderTest | Should -HaveParameter ErrorRecord -Type System.Management.Automation.ErrorRecord[] -Mandatory:$false } - It "Should have Tag as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Tag -Type String[] -Mandatory:$false + It "Should have Tag as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Tag -Type System.String[] -Mandatory:$false } - It "Should have FunctionName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter FunctionName -Type String -Mandatory:$false + It "Should have FunctionName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter FunctionName -Type System.String -Mandatory:$false } - It "Should have File as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter File -Type String -Mandatory:$false + It "Should have File as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter File -Type System.String -Mandatory:$false } - It "Should have Line as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter Line -Type Int32 -Mandatory:$false + It "Should have Line as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter Line -Type System.Int32 -Mandatory:$false } - It "Should have Target as a non-mandatory Object parameter" { - $CommandUnderTest | Should -HaveParameter Target -Type Object -Mandatory:$false + It "Should have Target as a non-mandatory System.Object parameter" { + $CommandUnderTest | Should -HaveParameter Target -Type System.Object -Mandatory:$false } - It "Should have Exception as a non-mandatory Exception parameter" { - $CommandUnderTest | Should -HaveParameter Exception -Type Exception -Mandatory:$false + It "Should have Exception as a non-mandatory System.Exception parameter" { + $CommandUnderTest | Should -HaveParameter Exception -Type System.Exception -Mandatory:$false } - It "Should have OverrideExceptionMessage as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter OverrideExceptionMessage -Type Switch -Mandatory:$false + It "Should have OverrideExceptionMessage as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter OverrideExceptionMessage -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have Continue as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Continue -Type Switch -Mandatory:$false + It "Should have Continue as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Continue -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have SilentlyContinue as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter SilentlyContinue -Type Switch -Mandatory:$false + It "Should have SilentlyContinue as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter SilentlyContinue -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have ContinueLabel as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ContinueLabel -Type String -Mandatory:$false + It "Should have ContinueLabel as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter ContinueLabel -Type System.String -Mandatory:$false } } diff --git a/tests/Suspend-DbaAgDbDataMovement.Tests.ps1 b/tests/Suspend-DbaAgDbDataMovement.Tests.ps1 index a050f873fa..aa1b0cbbee 100644 --- a/tests/Suspend-DbaAgDbDataMovement.Tests.ps1 +++ b/tests/Suspend-DbaAgDbDataMovement.Tests.ps1 @@ -27,22 +27,22 @@ Describe "Suspend-DbaAgDbDataMovement" { $CommandUnderTest = Get-Command Suspend-DbaAgDbDataMovement } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityDatabase[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Sync-DbaAvailabilityGroup.Tests.ps1 b/tests/Sync-DbaAvailabilityGroup.Tests.ps1 index ec03558067..615342edee 100644 --- a/tests/Sync-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Sync-DbaAvailabilityGroup.Tests.ps1 @@ -12,46 +12,46 @@ Describe "Sync-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command Sync-DbaAvailabilityGroup } It "Should have Primary parameter" { - $CommandUnderTest | Should -HaveParameter Primary -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Primary -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have PrimarySqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter PrimarySqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter PrimarySqlCredential -Type System.Management.Automation.PSCredential } It "Should have Secondary parameter" { - $CommandUnderTest | Should -HaveParameter Secondary -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Secondary -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SecondarySqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type System.Management.Automation.PSCredential } It "Should have AvailabilityGroup parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String } It "Should have Exclude parameter" { - $CommandUnderTest | Should -HaveParameter Exclude -Type String[] + $CommandUnderTest | Should -HaveParameter Exclude -Type System.String[] } It "Should have Login parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have ExcludeLogin parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type System.String[] } It "Should have Job parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type String[] + $CommandUnderTest | Should -HaveParameter Job -Type System.String[] } It "Should have ExcludeJob parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeJob -Type System.String[] } It "Should have DisableJobOnDestination parameter" { - $CommandUnderTest | Should -HaveParameter DisableJobOnDestination -Type Switch + $CommandUnderTest | Should -HaveParameter DisableJobOnDestination -Type System.Management.Automation.SwitchParameter } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] } 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 } } } diff --git a/tests/Sync-DbaLoginPermission.Tests.ps1 b/tests/Sync-DbaLoginPermission.Tests.ps1 index 942127add6..b35b60db8c 100644 --- a/tests/Sync-DbaLoginPermission.Tests.ps1 +++ b/tests/Sync-DbaLoginPermission.Tests.ps1 @@ -35,25 +35,25 @@ CREATE LOGIN [$DBUserName] $CommandUnderTest = Get-Command Sync-DbaLoginPermission } It "Should have Source as a parameter" { - $CommandUnderTest | Should -HaveParameter Source -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Source -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SourceSqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SourceSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SourceSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Destination as a parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Destination -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have DestinationSqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have ExcludeLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type System.String[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaAgSpn.Tests.ps1 b/tests/Test-DbaAgSpn.Tests.ps1 index 64589a1981..0ca50c360e 100644 --- a/tests/Test-DbaAgSpn.Tests.ps1 +++ b/tests/Test-DbaAgSpn.Tests.ps1 @@ -19,16 +19,16 @@ Describe "Test-DbaAgSpn" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false } It "Should have AvailabilityGroup parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] -Mandatory:$false } It "Should have Listener parameter" { - $CommandUnderTest | Should -HaveParameter Listener -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Listener -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaAgentJobOwner.Tests.ps1 b/tests/Test-DbaAgentJobOwner.Tests.ps1 index 2ce927803f..3ad1703b53 100644 --- a/tests/Test-DbaAgentJobOwner.Tests.ps1 +++ b/tests/Test-DbaAgentJobOwner.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Test-DbaAgentJobOwner Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Test-DbaAgentJobOwner } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] -Mandatory:$false } It "Should have ExcludeJob as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeJob -Type System.Object[] -Mandatory:$false } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Login -Type System.String -Mandatory:$false } It "Should have EnableException as a parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false diff --git a/tests/Test-DbaAvailabilityGroup.Tests.ps1 b/tests/Test-DbaAvailabilityGroup.Tests.ps1 index c79deb79a2..1baed01a89 100644 --- a/tests/Test-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Test-DbaAvailabilityGroup.Tests.ps1 @@ -6,34 +6,34 @@ Describe "Test-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command Test-DbaAvailabilityGroup } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String } It "Should have Secondary as a parameter" { - $CommandUnderTest | Should -HaveParameter Secondary -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Secondary -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SecondarySqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type System.Management.Automation.PSCredential } It "Should have AddDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter AddDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter AddDatabase -Type System.String[] } It "Should have SeedingMode as a parameter" { - $CommandUnderTest | Should -HaveParameter SeedingMode -Type String + $CommandUnderTest | Should -HaveParameter SeedingMode -Type System.String } It "Should have SharedPath as a parameter" { - $CommandUnderTest | Should -HaveParameter SharedPath -Type String + $CommandUnderTest | Should -HaveParameter SharedPath -Type System.String } It "Should have UseLastBackup as a parameter" { - $CommandUnderTest | Should -HaveParameter UseLastBackup -Type Switch + $CommandUnderTest | Should -HaveParameter UseLastBackup -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaBackupEncrypted.Tests.ps1 b/tests/Test-DbaBackupEncrypted.Tests.ps1 index 83533879be..bde2ee975f 100644 --- a/tests/Test-DbaBackupEncrypted.Tests.ps1 +++ b/tests/Test-DbaBackupEncrypted.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Test-DbaBackupEncrypted" { $CommandUnderTest = Get-Command Test-DbaBackupEncrypted } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String[] + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaBackupInformation.Tests.ps1 b/tests/Test-DbaBackupInformation.Tests.ps1 index 93e88779ac..6c45033439 100644 --- a/tests/Test-DbaBackupInformation.Tests.ps1 +++ b/tests/Test-DbaBackupInformation.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Test-DbaBackupInformation Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Test-DbaBackupInformation } It "Should have BackupHistory as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupHistory -Type Object[] + $CommandUnderTest | Should -HaveParameter BackupHistory -Type System.Object[] } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have WithReplace as a switch parameter" { $CommandUnderTest | Should -HaveParameter WithReplace -Type switch diff --git a/tests/Test-DbaBuild.Tests.ps1 b/tests/Test-DbaBuild.Tests.ps1 index e7c7ac45c5..b72dc40f85 100644 --- a/tests/Test-DbaBuild.Tests.ps1 +++ b/tests/Test-DbaBuild.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Test-DbaBuild" { $CommandUnderTest = Get-Command Test-DbaBuild } It "Should have Build parameter" { - $CommandUnderTest | Should -HaveParameter Build -Type Version[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Build -Type Microsoft.Version[] -Mandatory:$false } It "Should have MinimumBuild parameter" { - $CommandUnderTest | Should -HaveParameter MinimumBuild -Type Version -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinimumBuild -Type Microsoft.Version -Mandatory:$false } It "Should have MaxBehind parameter" { - $CommandUnderTest | Should -HaveParameter MaxBehind -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxBehind -Type System.String -Mandatory:$false } It "Should have Latest parameter" { - $CommandUnderTest | Should -HaveParameter Latest -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Latest -Type System.Management.Automation.Switch -Mandatory:$false } 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 Update parameter" { - $CommandUnderTest | Should -HaveParameter Update -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Update -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have Quiet parameter" { - $CommandUnderTest | Should -HaveParameter Quiet -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Quiet -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 } } diff --git a/tests/Test-DbaCmConnection.Tests.ps1 b/tests/Test-DbaCmConnection.Tests.ps1 index efb9992e99..181c169273 100644 --- a/tests/Test-DbaCmConnection.Tests.ps1 +++ b/tests/Test-DbaCmConnection.Tests.ps1 @@ -12,10 +12,10 @@ Describe "Test-DbaCmConnection" { $CommandUnderTest = Get-Command Test-DbaCmConnection } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaCmConnectionParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaCmConnectionParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have Type as a parameter" { $CommandUnderTest | Should -HaveParameter Type -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] diff --git a/tests/Test-DbaComputerCertificateExpiration.Tests.ps1 b/tests/Test-DbaComputerCertificateExpiration.Tests.ps1 index 79257edc1b..9fb452ae26 100644 --- a/tests/Test-DbaComputerCertificateExpiration.Tests.ps1 +++ b/tests/Test-DbaComputerCertificateExpiration.Tests.ps1 @@ -5,32 +5,32 @@ Describe "Test-DbaComputerCertificateExpiration" { BeforeAll { $CommandUnderTest = Get-Command Test-DbaComputerCertificateExpiration } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have Store as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Store -Type String[] -Mandatory:$false + It "Should have Store as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Store -Type System.String[] -Mandatory:$false } - It "Should have Folder as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Folder -Type String[] -Mandatory:$false + It "Should have Folder as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Folder -Type System.String[] -Mandatory:$false } - It "Should have Type as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Type -Type String -Mandatory:$false + It "Should have Type as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false } - It "Should have Path as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + It "Should have Path as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } - It "Should have Thumbprint as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Thumbprint -Type String[] -Mandatory:$false + It "Should have Thumbprint as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Thumbprint -Type System.String[] -Mandatory:$false } - It "Should have Threshold as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Threshold -Type Int32 -Mandatory:$false + It "Should have Threshold as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Threshold -Type System.Int32 -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 } } } diff --git a/tests/Test-DbaConnection.Tests.ps1 b/tests/Test-DbaConnection.Tests.ps1 index cb552381c2..bc63bd3718 100644 --- a/tests/Test-DbaConnection.Tests.ps1 +++ b/tests/Test-DbaConnection.Tests.ps1 @@ -9,14 +9,14 @@ Describe "Test-DbaConnection" { BeforeAll { $CommandUnderTest = Get-Command Test-DbaConnection } - 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 Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -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 SkipPSRemoting as a non-mandatory switch parameter" { $CommandUnderTest | Should -HaveParameter SkipPSRemoting -Type switch -Mandatory:$false diff --git a/tests/Test-DbaConnectionAuthScheme.Tests.ps1 b/tests/Test-DbaConnectionAuthScheme.Tests.ps1 index d0f85421b0..e6dc84adde 100644 --- a/tests/Test-DbaConnectionAuthScheme.Tests.ps1 +++ b/tests/Test-DbaConnectionAuthScheme.Tests.ps1 @@ -10,10 +10,10 @@ Describe "Test-DbaConnectionAuthScheme" { $CommandUnderTest = Get-Command Test-DbaConnectionAuthScheme } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Kerberos as a switch parameter" { $CommandUnderTest | Should -HaveParameter Kerberos -Type switch diff --git a/tests/Test-DbaDbCollation.Tests.ps1 b/tests/Test-DbaDbCollation.Tests.ps1 index d169662241..36a159ba1f 100644 --- a/tests/Test-DbaDbCollation.Tests.ps1 +++ b/tests/Test-DbaDbCollation.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Test-DbaDbCollation" { $CommandUnderTest = Get-Command Test-DbaDbCollation } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaDbCompatibility.Tests.ps1 b/tests/Test-DbaDbCompatibility.Tests.ps1 index c8a8fac929..5cb30d54de 100644 --- a/tests/Test-DbaDbCompatibility.Tests.ps1 +++ b/tests/Test-DbaDbCompatibility.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Test-DbaDbCompatibility" { $CommandUnderTest = Get-Command Test-DbaDbCompatibility } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaDbCompression.Tests.ps1 b/tests/Test-DbaDbCompression.Tests.ps1 index 84e2b41878..c6d9974cc4 100644 --- a/tests/Test-DbaDbCompression.Tests.ps1 +++ b/tests/Test-DbaDbCompression.Tests.ps1 @@ -11,29 +11,29 @@ Describe "Test-DbaDbCompression Unit Tests" -Tag 'UnitTests' { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } - It "Should have Database as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + It "Should have Database as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } - It "Should have ExcludeDatabase as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } - It "Should have Schema as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Schema -Type String[] -Mandatory:$false + It "Should have Schema as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Schema -Type System.String[] -Mandatory:$false } - It "Should have Table as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + It "Should have Table as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] -Mandatory:$false } - It "Should have ResultSize as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter ResultSize -Type Int32 -Mandatory:$false + It "Should have ResultSize as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter ResultSize -Type System.Int32 -Mandatory:$false } - It "Should have Rank as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Rank -Type String -Mandatory:$false + It "Should have Rank as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Rank -Type System.String -Mandatory:$false } - It "Should have FilterBy as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FilterBy -Type String -Mandatory:$false + It "Should have FilterBy as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FilterBy -Type System.String -Mandatory:$false } - It "Should have EnableException as a non-mandatory parameter of type Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory parameter of type System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Test-DbaDbDataGeneratorConfig.Tests.ps1 b/tests/Test-DbaDbDataGeneratorConfig.Tests.ps1 index 44e21a7f32..6039520c48 100644 --- a/tests/Test-DbaDbDataGeneratorConfig.Tests.ps1 +++ b/tests/Test-DbaDbDataGeneratorConfig.Tests.ps1 @@ -11,10 +11,10 @@ Describe "Test-DbaDbDataGeneratorConfig" { $CommandUnderTest = Get-Command Test-DbaDbDataGeneratorConfig } It "Should have FilePath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaDbDataMaskingConfig.Tests.ps1 b/tests/Test-DbaDbDataMaskingConfig.Tests.ps1 index 1f6a808185..5fb4d4f8c8 100644 --- a/tests/Test-DbaDbDataMaskingConfig.Tests.ps1 +++ b/tests/Test-DbaDbDataMaskingConfig.Tests.ps1 @@ -15,10 +15,10 @@ Describe "Test-DbaDbDataMaskingConfig" { $CommandUnderTest = Get-Command Test-DbaDbDataMaskingConfig } It "Should have FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaDbLogShipStatus.Tests.ps1 b/tests/Test-DbaDbLogShipStatus.Tests.ps1 index ae347b0661..c06e0be885 100644 --- a/tests/Test-DbaDbLogShipStatus.Tests.ps1 +++ b/tests/Test-DbaDbLogShipStatus.Tests.ps1 @@ -7,28 +7,28 @@ Describe "Test-DbaDbLogShipStatus Unit Tests" -Tag "UnitTests" { $CommandUnderTest = Get-Command $CommandName } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have Simple as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Simple -Type switch + $CommandUnderTest | Should -HaveParameter Simple -Type System.Management.Automation.SwitchParameter } It "Should have Primary as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Primary -Type switch + $CommandUnderTest | Should -HaveParameter Primary -Type System.Management.Automation.SwitchParameter } It "Should have Secondary as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Secondary -Type switch + $CommandUnderTest | Should -HaveParameter Secondary -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Test-DbaDbOwner.Tests.ps1 b/tests/Test-DbaDbOwner.Tests.ps1 index 98ff21abb9..5403166c9a 100644 --- a/tests/Test-DbaDbOwner.Tests.ps1 +++ b/tests/Test-DbaDbOwner.Tests.ps1 @@ -10,25 +10,25 @@ Describe "Test-DbaDbOwner Unit Tests" -Tag "UnitTests" { $CommandUnderTest = Get-Command Test-DbaDbOwner } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have TargetLogin parameter" { - $CommandUnderTest | Should -HaveParameter TargetLogin -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter TargetLogin -Type System.String -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaDbQueryStore.Tests.ps1 b/tests/Test-DbaDbQueryStore.Tests.ps1 index 27d5b5c38b..5bcdb4e1e9 100644 --- a/tests/Test-DbaDbQueryStore.Tests.ps1 +++ b/tests/Test-DbaDbQueryStore.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Test-DbaDbQueryStore" { $CommandUnderTest = Get-Command Test-DbaDbQueryStore } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaDbRecoveryModel.Tests.ps1 b/tests/Test-DbaDbRecoveryModel.Tests.ps1 index 4b2b966ff1..b1c2abe254 100644 --- a/tests/Test-DbaDbRecoveryModel.Tests.ps1 +++ b/tests/Test-DbaDbRecoveryModel.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Test-DbaDbRecoveryModel Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Test-DbaDbRecoveryModel } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have RecoveryModel as a parameter" { - $CommandUnderTest | Should -HaveParameter RecoveryModel -Type Object + $CommandUnderTest | Should -HaveParameter RecoveryModel -Type System.Object } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Test-DbaDeprecatedFeature.Tests.ps1 b/tests/Test-DbaDeprecatedFeature.Tests.ps1 index 48b2a17bc2..c7e9085b5e 100644 --- a/tests/Test-DbaDeprecatedFeature.Tests.ps1 +++ b/tests/Test-DbaDeprecatedFeature.Tests.ps1 @@ -11,22 +11,22 @@ Describe "Test-DbaDeprecatedFeature" { $CommandUnderTest = Get-Command Test-DbaDeprecatedFeature } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaDiskAlignment.Tests.ps1 b/tests/Test-DbaDiskAlignment.Tests.ps1 index c944dba4ca..a3ebe223c8 100644 --- a/tests/Test-DbaDiskAlignment.Tests.ps1 +++ b/tests/Test-DbaDiskAlignment.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Test-DbaDiskAlignment" { BeforeAll { $CommandUnderTest = Get-Command Test-DbaDiskAlignment } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -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 NoSqlCheck as a non-mandatory switch parameter" { $CommandUnderTest | Should -HaveParameter NoSqlCheck -Type switch -Mandatory:$false diff --git a/tests/Test-DbaDiskAllocation.Tests.ps1 b/tests/Test-DbaDiskAllocation.Tests.ps1 index da184e151a..0298f00b5e 100644 --- a/tests/Test-DbaDiskAllocation.Tests.ps1 +++ b/tests/Test-DbaDiskAllocation.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Test-DbaDiskAllocation" { $CommandUnderTest = Get-Command Test-DbaDiskAllocation } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.Object[] -Mandatory:$false } It "Should have NoSqlCheck as a parameter" { - $CommandUnderTest | Should -HaveParameter NoSqlCheck -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoSqlCheck -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaDiskSpeed.Tests.ps1 b/tests/Test-DbaDiskSpeed.Tests.ps1 index 29efcb64cc..51cbd96bdc 100644 --- a/tests/Test-DbaDiskSpeed.Tests.ps1 +++ b/tests/Test-DbaDiskSpeed.Tests.ps1 @@ -10,23 +10,23 @@ Describe "Test-DbaDiskSpeed Unit Tests" -Tag 'UnitTests' { BeforeAll { $CommandUnderTest = Get-Command Test-DbaDiskSpeed } - It "Should have SqlInstance as a non-mandatory DbaInstanceParameter[] parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have SqlInstance as a non-mandatory Dataplat.Dbatools.Parameter.DbaInstanceParameter[] parameter" { + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have SqlCredential as a non-mandatory PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + It "Should have SqlCredential as a non-mandatory System.Management.Automation.PSCredential parameter" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have Database as a non-mandatory Object[] parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + It "Should have Database as a non-mandatory System.Object[] parameter" { + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } - It "Should have ExcludeDatabase as a non-mandatory Object[] parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory System.Object[] parameter" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have AggregateBy as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter AggregateBy -Type String -Mandatory:$false + It "Should have AggregateBy as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter AggregateBy -Type System.String -Mandatory:$false } - It "Should have EnableException as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + It "Should have EnableException as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Test-DbaEndpoint.Tests.ps1 b/tests/Test-DbaEndpoint.Tests.ps1 index 26993f092d..0f4bd6adc1 100644 --- a/tests/Test-DbaEndpoint.Tests.ps1 +++ b/tests/Test-DbaEndpoint.Tests.ps1 @@ -10,19 +10,19 @@ Describe "Test-DbaEndpoint" { $CommandUnderTest = Get-Command Test-DbaEndpoint } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Endpoint as a parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String[] + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String[] } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Endpoint[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Endpoint[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaIdentityUsage.Tests.ps1 b/tests/Test-DbaIdentityUsage.Tests.ps1 index 56a58e41d6..2edf486cbe 100644 --- a/tests/Test-DbaIdentityUsage.Tests.ps1 +++ b/tests/Test-DbaIdentityUsage.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Test-DbaIdentityUsage" { $CommandUnderTest = Get-Command Test-DbaIdentityUsage } 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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have Threshold parameter" { - $CommandUnderTest | Should -HaveParameter Threshold -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Threshold -Type System.Int32 -Mandatory:$false } It "Should have ExcludeSystem parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaInstanceName.Tests.ps1 b/tests/Test-DbaInstanceName.Tests.ps1 index e6d7f9f58e..61fabb4d11 100644 --- a/tests/Test-DbaInstanceName.Tests.ps1 +++ b/tests/Test-DbaInstanceName.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Test-DbaInstanceName" { $CommandUnderTest = Get-Command Test-DbaInstanceName } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have ExcludeSsrs as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSsrs -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSsrs -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaLastBackup.Tests.ps1 b/tests/Test-DbaLastBackup.Tests.ps1 index c3a14fa954..f6363b7ef0 100644 --- a/tests/Test-DbaLastBackup.Tests.ps1 +++ b/tests/Test-DbaLastBackup.Tests.ps1 @@ -18,79 +18,79 @@ Describe "Test-DbaLastBackup Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have Destination as a parameter" { $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter -Mandatory:$false } It "Should have DestinationSqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Object -Mandatory:$false } It "Should have DataDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter DataDirectory -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DataDirectory -Type System.String -Mandatory:$false } It "Should have LogDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter LogDirectory -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LogDirectory -Type System.String -Mandatory:$false } It "Should have FileStreamDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter FileStreamDirectory -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileStreamDirectory -Type System.String -Mandatory:$false } It "Should have Prefix as a parameter" { - $CommandUnderTest | Should -HaveParameter Prefix -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Prefix -Type System.String -Mandatory:$false } It "Should have VerifyOnly as a parameter" { - $CommandUnderTest | Should -HaveParameter VerifyOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter VerifyOnly -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoCheck as a parameter" { - $CommandUnderTest | Should -HaveParameter NoCheck -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoCheck -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoDrop as a parameter" { - $CommandUnderTest | Should -HaveParameter NoDrop -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoDrop -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have CopyFile as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyFile -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CopyFile -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have CopyPath as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyPath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CopyPath -Type System.String -Mandatory:$false } It "Should have MaxSize as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxSize -Type System.Int32 -Mandatory:$false } It "Should have DeviceType as a parameter" { - $CommandUnderTest | Should -HaveParameter DeviceType -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DeviceType -Type System.String[] -Mandatory:$false } It "Should have IncludeCopyOnly as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeCopyOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeCopyOnly -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IgnoreLogBackup as a parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreLogBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreLogBackup -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have AzureCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter AzureCredential -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AzureCredential -Type System.String -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have MaxTransferSize as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxTransferSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxTransferSize -Type System.Int32 -Mandatory:$false } It "Should have BufferCount as a parameter" { - $CommandUnderTest | Should -HaveParameter BufferCount -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BufferCount -Type System.Int32 -Mandatory:$false } It "Should have IgnoreDiffBackup as a parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreDiffBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreDiffBackup -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have MaxDop as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxDop -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxDop -Type System.Int32 -Mandatory:$false } It "Should have ReuseSourceFolderStructure as a parameter" { - $CommandUnderTest | Should -HaveParameter ReuseSourceFolderStructure -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ReuseSourceFolderStructure -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Test-DbaLinkedServerConnection.Tests.ps1 b/tests/Test-DbaLinkedServerConnection.Tests.ps1 index e171f1efa4..4262730ba9 100644 --- a/tests/Test-DbaLinkedServerConnection.Tests.ps1 +++ b/tests/Test-DbaLinkedServerConnection.Tests.ps1 @@ -11,13 +11,13 @@ Describe "Test-DbaLinkedServerConnection" { $CommandUnderTest = Get-Command Test-DbaLinkedServerConnection } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaLoginPassword.Tests.ps1 b/tests/Test-DbaLoginPassword.Tests.ps1 index 37a876b3d4..0c3610da4f 100644 --- a/tests/Test-DbaLoginPassword.Tests.ps1 +++ b/tests/Test-DbaLoginPassword.Tests.ps1 @@ -11,22 +11,22 @@ Describe "Test-DbaLoginPassword" { $CommandUnderTest = Get-Command Test-DbaLoginPassword } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Login parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] } It "Should have Dictionary parameter" { - $CommandUnderTest | Should -HaveParameter Dictionary -Type String[] + $CommandUnderTest | Should -HaveParameter Dictionary -Type System.String[] } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Login[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaLsnChain.Tests.ps1 b/tests/Test-DbaLsnChain.Tests.ps1 index 96ea5c5cbf..3c48341216 100644 --- a/tests/Test-DbaLsnChain.Tests.ps1 +++ b/tests/Test-DbaLsnChain.Tests.ps1 @@ -11,13 +11,13 @@ Describe "Test-DbaLsnChain" { $CommandUnderTest = Get-Command Test-DbaLsnChain } It "Should have FilteredRestoreFiles as a parameter" { - $CommandUnderTest | Should -HaveParameter FilteredRestoreFiles -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilteredRestoreFiles -Type System.Object[] -Mandatory:$false } It "Should have Continue as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Continue -Type switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Continue -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaManagementObject.Tests.ps1 b/tests/Test-DbaManagementObject.Tests.ps1 index d13d959db3..a9ef482ccc 100644 --- a/tests/Test-DbaManagementObject.Tests.ps1 +++ b/tests/Test-DbaManagementObject.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Test-DbaManagementObject" { BeforeAll { $CommandUnderTest = Get-Command Test-DbaManagementObject } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have VersionNumber as a non-mandatory parameter of type Int32[]" { - $CommandUnderTest | Should -HaveParameter VersionNumber -Type Int32[] -Mandatory:$false + It "Should have VersionNumber as a non-mandatory parameter of type System.Int32[]" { + $CommandUnderTest | Should -HaveParameter VersionNumber -Type System.Int32[] -Mandatory:$false } It "Should have EnableException as a non-mandatory switch parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type switch -Mandatory:$false diff --git a/tests/Test-DbaMaxDop.Tests.ps1 b/tests/Test-DbaMaxDop.Tests.ps1 index 48c28f294c..7439e7a711 100644 --- a/tests/Test-DbaMaxDop.Tests.ps1 +++ b/tests/Test-DbaMaxDop.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Test-DbaMaxDop" { $CommandUnderTest = Get-Command Test-DbaMaxDop } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Microsoft.SqlServer.Management.Smo.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-DbaMaxMemory.Tests.ps1 b/tests/Test-DbaMaxMemory.Tests.ps1 index 47c0c7c80a..361d80c2a1 100644 --- a/tests/Test-DbaMaxMemory.Tests.ps1 +++ b/tests/Test-DbaMaxMemory.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Test-DbaMaxMemory" { $CommandUnderTest = Get-Command Test-DbaMaxMemory } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaMigrationConstraint.Tests.ps1 b/tests/Test-DbaMigrationConstraint.Tests.ps1 index c506515c3a..bdc3691db6 100644 --- a/tests/Test-DbaMigrationConstraint.Tests.ps1 +++ b/tests/Test-DbaMigrationConstraint.Tests.ps1 @@ -28,25 +28,25 @@ Describe "Test-DbaMigrationConstraint" { $CommandUnderTest = Get-Command Test-DbaMigrationConstraint } It "Should have Source parameter" { - $CommandUnderTest | Should -HaveParameter Source -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Source -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SourceSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SourceSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SourceSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Destination parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Destination -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have DestinationSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaNetworkLatency.Tests.ps1 b/tests/Test-DbaNetworkLatency.Tests.ps1 index 16bf3a2ba8..dfdce8e042 100644 --- a/tests/Test-DbaNetworkLatency.Tests.ps1 +++ b/tests/Test-DbaNetworkLatency.Tests.ps1 @@ -11,19 +11,19 @@ Describe "Test-DbaNetworkLatency" { $CommandUnderTest = Get-Command Test-DbaNetworkLatency } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Query as a parameter" { - $CommandUnderTest | Should -HaveParameter Query -Type String + $CommandUnderTest | Should -HaveParameter Query -Type System.String } It "Should have Count as a parameter" { - $CommandUnderTest | Should -HaveParameter Count -Type Int32 + $CommandUnderTest | Should -HaveParameter Count -Type System.Int32 } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaOptimizeForAdHoc.Tests.ps1 b/tests/Test-DbaOptimizeForAdHoc.Tests.ps1 index bda0246608..fef5ae4774 100644 --- a/tests/Test-DbaOptimizeForAdHoc.Tests.ps1 +++ b/tests/Test-DbaOptimizeForAdHoc.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Test-DbaOptimizeForAdHoc" { $CommandUnderTest = Get-Command Test-DbaOptimizeForAdHoc } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaPath.Tests.ps1 b/tests/Test-DbaPath.Tests.ps1 index c345789853..04f6f5928d 100644 --- a/tests/Test-DbaPath.Tests.ps1 +++ b/tests/Test-DbaPath.Tests.ps1 @@ -19,16 +19,16 @@ Describe "Test-DbaPath" { $CommandUnderTest = Get-Command Test-DbaPath } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type Object + $CommandUnderTest | Should -HaveParameter Path -Type System.Object } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaPowerPlan.Tests.ps1 b/tests/Test-DbaPowerPlan.Tests.ps1 index c59e9adcac..9da74dec66 100644 --- a/tests/Test-DbaPowerPlan.Tests.ps1 +++ b/tests/Test-DbaPowerPlan.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Test-DbaPowerPlan" { $CommandUnderTest = Get-Command Test-DbaPowerPlan } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential } It "Should have PowerPlan as a parameter" { - $CommandUnderTest | Should -HaveParameter PowerPlan -Type String + $CommandUnderTest | Should -HaveParameter PowerPlan -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Test-DbaReplLatency.Tests.ps1 b/tests/Test-DbaReplLatency.Tests.ps1 index 7641411ee7..8bf75ddae6 100644 --- a/tests/Test-DbaReplLatency.Tests.ps1 +++ b/tests/Test-DbaReplLatency.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Test-DbaReplLatency" { $CommandUnderTest = Get-Command Test-DbaReplLatency } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have PublicationName parameter" { - $CommandUnderTest | Should -HaveParameter PublicationName -Type Object[] + $CommandUnderTest | Should -HaveParameter PublicationName -Type System.Object[] } It "Should have TimeToLive parameter" { - $CommandUnderTest | Should -HaveParameter TimeToLive -Type Int32 + $CommandUnderTest | Should -HaveParameter TimeToLive -Type System.Int32 } It "Should have RetainToken parameter" { - $CommandUnderTest | Should -HaveParameter RetainToken -Type Switch + $CommandUnderTest | Should -HaveParameter RetainToken -Type System.Management.Automation.SwitchParameter } It "Should have DisplayTokenHistory parameter" { - $CommandUnderTest | Should -HaveParameter DisplayTokenHistory -Type Switch + $CommandUnderTest | Should -HaveParameter DisplayTokenHistory -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 } } diff --git a/tests/Test-DbaSpn.Tests.ps1 b/tests/Test-DbaSpn.Tests.ps1 index a3745fff6a..4fe8eb5587 100644 --- a/tests/Test-DbaSpn.Tests.ps1 +++ b/tests/Test-DbaSpn.Tests.ps1 @@ -9,14 +9,14 @@ Describe "Test-DbaSpn" { BeforeAll { $CommandUnderTest = Get-Command Test-DbaSpn } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -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 } } diff --git a/tests/Test-DbaTempDbConfig.Tests.ps1 b/tests/Test-DbaTempDbConfig.Tests.ps1 index 690402e17b..550ed1d09d 100644 --- a/tests/Test-DbaTempDbConfig.Tests.ps1 +++ b/tests/Test-DbaTempDbConfig.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Test-DbaTempDbConfig" { BeforeAll { $CommandUnderTest = Get-Command Test-DbaTempDbConfig } - 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 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 } } diff --git a/tests/Test-DbaWindowsLogin.Tests.ps1 b/tests/Test-DbaWindowsLogin.Tests.ps1 index d3b2fcf410..2d1939966f 100644 --- a/tests/Test-DbaWindowsLogin.Tests.ps1 +++ b/tests/Test-DbaWindowsLogin.Tests.ps1 @@ -18,22 +18,22 @@ Describe "Test-DbaWindowsLogin" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Login parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] -Mandatory:$false } It "Should have ExcludeLogin parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type System.String[] -Mandatory:$false } It "Should have FilterBy parameter" { - $CommandUnderTest | Should -HaveParameter FilterBy -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilterBy -Type System.String -Mandatory:$false } It "Should have IgnoreDomains parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreDomains -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreDomains -Type System.String[] -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Login[] -Mandatory:$false } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Test-PSRemoting.Tests.ps1 b/tests/Test-PSRemoting.Tests.ps1 index 6baafcc309..f0fea38fb7 100644 --- a/tests/Test-PSRemoting.Tests.ps1 +++ b/tests/Test-PSRemoting.Tests.ps1 @@ -10,14 +10,14 @@ Describe "Test-PSRemoting" { BeforeAll { $CommandUnderTest = Get-Command Test-PSRemoting } - It "Should have ComputerName as a non-mandatory parameter of type DbaInstanceParameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false } - It "Should have Credential as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter Credential -Type Object -Mandatory:$false + It "Should have Credential as a non-mandatory parameter of type System.Object" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Object -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 } } diff --git a/tests/Uninstall-DbaSqlWatch.Tests.ps1 b/tests/Uninstall-DbaSqlWatch.Tests.ps1 index 8eee211bbf..7f6207809d 100644 --- a/tests/Uninstall-DbaSqlWatch.Tests.ps1 +++ b/tests/Uninstall-DbaSqlWatch.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Uninstall-DbaSqlWatch" { $CommandUnderTest = Get-Command Uninstall-DbaSqlWatch } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Unregister-DbatoolsConfig.Tests.ps1 b/tests/Unregister-DbatoolsConfig.Tests.ps1 index 909862780d..bda59ac12e 100644 --- a/tests/Unregister-DbatoolsConfig.Tests.ps1 +++ b/tests/Unregister-DbatoolsConfig.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Unregister-DbatoolsConfig" { $CommandUnderTest = Get-Command Unregister-DbatoolsConfig } It "Accepts ConfigurationItem as a parameter" { - $CommandUnderTest | Should -HaveParameter ConfigurationItem -Type Config[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ConfigurationItem -Type Dataplat.Dbatools.Configuration.Config[] -Mandatory:$false } It "Accepts FullName as a parameter" { - $CommandUnderTest | Should -HaveParameter FullName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FullName -Type System.String[] -Mandatory:$false } It "Accepts Module as a parameter" { - $CommandUnderTest | Should -HaveParameter Module -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Module -Type System.String -Mandatory:$false } It "Accepts Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Name -Type System.String -Mandatory:$false } It "Accepts Scope as a parameter" { $CommandUnderTest | Should -HaveParameter Scope -Type Dataplat.Dbatools.Configuration.ConfigScope -Mandatory:$false diff --git a/tests/Update-DbaBuildReference.Tests.ps1 b/tests/Update-DbaBuildReference.Tests.ps1 index 75c8b09aff..c9e57d3521 100644 --- a/tests/Update-DbaBuildReference.Tests.ps1 +++ b/tests/Update-DbaBuildReference.Tests.ps1 @@ -11,10 +11,10 @@ Describe "Update-DbaBuildReference" { $CommandUnderTest = Get-Command Update-DbaBuildReference } It "Should have LocalFile as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String + $CommandUnderTest | Should -HaveParameter LocalFile -Type System.String } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Update-DbaInstance.Tests.ps1 b/tests/Update-DbaInstance.Tests.ps1 index c3b495b0a7..bb9c72461e 100644 --- a/tests/Update-DbaInstance.Tests.ps1 +++ b/tests/Update-DbaInstance.Tests.ps1 @@ -70,7 +70,7 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { } It "should call internal functions using CredSSP" { $password = 'pwd' | ConvertTo-SecureString -AsPlainText -Force - $cred = [pscredential]::new('usr', $password) + $cred = [System.Management.Automation.PSCredential]::new('usr', $password) $null = Update-DbaInstance -ComputerName 'mocked' -Credential $cred -Version "2012SP3" -Path 'mocked' -EnableException -Confirm:$false Assert-MockCalled -ParameterFilter { $Authentication -eq 'CredSSP' } -CommandName Find-SqlInstanceUpdate -Exactly 1 -Scope It -ModuleName dbatools Assert-MockCalled -CommandName Initialize-CredSSP -Exactly 1 -Scope It -ModuleName dbatools @@ -84,7 +84,7 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { } It "should call internal functions using Kerberos" { $password = 'pwd' | ConvertTo-SecureString -AsPlainText -Force - $cred = [pscredential]::new('usr', $password) + $cred = [System.Management.Automation.PSCredential]::new('usr', $password) $null = Update-DbaInstance -ComputerName 'mocked' -Authentication Kerberos -Credential $cred -Version "2012SP3" -Path 'mocked' -EnableException -Confirm:$false Assert-MockCalled -ParameterFilter { $Authentication -eq 'Kerberos' } -CommandName Find-SqlInstanceUpdate -Exactly 1 -Scope It -ModuleName dbatools Assert-MockCalled -CommandName Initialize-CredSSP -Exactly 0 -Scope It -ModuleName dbatools @@ -787,7 +787,7 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { } It "fails when KB is missing in the folder" { { Update-DbaInstance -Path $exeDir -EnableException } | Should throw 'Could not find installer for the SQL2008 update KB' - { Update-DbaInstance -Version 2008SP3CU7 -Path $exeDir -EnableException } | Should throw 'Could not find installer for the SQL2008 update KB' + { Update-DbaInstance -Version 2008SP3 -Path $exeDir -EnableException } | Should throw 'Could not find installer for the SQL2008 update KB' } It "fails when SP level is lower than required" { { Update-DbaInstance -Type CumulativeUpdate -EnableException } | Should throw 'Current SP version SQL2008SP2 is not the latest available' @@ -819,7 +819,7 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { $result.ExtractPath | Should -BeLike '*\dbatools_KB*Extract_*' $warVar | Should -BeLike '*failed with exit code 12345*' #revert default mock - Mock -CommandName Invoke-Program -MockWith { [pscustomobject]@{ Successful = $true } } -ModuleName dbatools + Mock -CommandName Invoke-Program -MockWith { [pscustomobject]@{ Successful = $true } -ModuleName dbatools } } } @@ -852,4 +852,4 @@ Describe "$CommandName Integration Tests" -Tag 'IntegrationTests' { } } } -} \ No newline at end of file +} diff --git a/tests/Update-DbaMaintenanceSolution.Tests.ps1 b/tests/Update-DbaMaintenanceSolution.Tests.ps1 index f6a19ffb9c..c9ef79f3f6 100644 --- a/tests/Update-DbaMaintenanceSolution.Tests.ps1 +++ b/tests/Update-DbaMaintenanceSolution.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Update-DbaMaintenanceSolution" { $CommandUnderTest = Get-Command Update-DbaMaintenanceSolution } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have Solution parameter" { - $CommandUnderTest | Should -HaveParameter Solution -Type String[] + $CommandUnderTest | Should -HaveParameter Solution -Type System.String[] } It "Should have LocalFile parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String + $CommandUnderTest | Should -HaveParameter LocalFile -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 } } diff --git a/tests/Update-DbaServiceAccount.Tests.ps1 b/tests/Update-DbaServiceAccount.Tests.ps1 index 8006794c5a..d02b9c7f1d 100644 --- a/tests/Update-DbaServiceAccount.Tests.ps1 +++ b/tests/Update-DbaServiceAccount.Tests.ps1 @@ -74,34 +74,34 @@ Describe "Update-DbaServiceAccount" { $CommandUnderTest = Get-Command Update-DbaServiceAccount } It "Should have ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false } It "Should have Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type Microsoft.SqlServer.Management.Smo.Credential -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have ServiceName as a parameter" { - $CommandUnderTest | Should -HaveParameter ServiceName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ServiceName -Type System.String[] -Mandatory:$false } It "Should have Username as a parameter" { - $CommandUnderTest | Should -HaveParameter Username -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Username -Type System.String -Mandatory:$false } It "Should have ServiceCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter ServiceCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ServiceCredential -Type Microsoft.SqlServer.Management.Smo.Credential -Mandatory:$false } It "Should have PreviousPassword as a parameter" { - $CommandUnderTest | Should -HaveParameter PreviousPassword -Type SecureString -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PreviousPassword -Type System.Security.SecureString -Mandatory:$false } It "Should have SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString -Mandatory:$false } It "Should have NoRestart as a parameter" { - $CommandUnderTest | Should -HaveParameter NoRestart -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoRestart -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Update-dbatools.Tests.ps1 b/tests/Update-dbatools.Tests.ps1 index c84d4653f2..6008ff77a5 100644 --- a/tests/Update-dbatools.Tests.ps1 +++ b/tests/Update-dbatools.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Update-Dbatools" { $CommandUnderTest = Get-Command Update-Dbatools } It "Should have Development as a Switch" { - $CommandUnderTest | Should -HaveParameter Development -Type switch + $CommandUnderTest | Should -HaveParameter Development -Type System.Management.Automation.SwitchParameter } It "Should have Cleanup as a Switch" { - $CommandUnderTest | Should -HaveParameter Cleanup -Type switch + $CommandUnderTest | Should -HaveParameter Cleanup -Type System.Management.Automation.SwitchParameter } It "Should have EnableException as a Switch" { - $CommandUnderTest | Should -HaveParameter EnableException -Type switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Watch-DbaDbLogin.Tests.ps1 b/tests/Watch-DbaDbLogin.Tests.ps1 index 46d1f246dc..29dba80622 100644 --- a/tests/Watch-DbaDbLogin.Tests.ps1 +++ b/tests/Watch-DbaDbLogin.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Watch-DbaDbLogin" { $CommandUnderTest = Get-Command Watch-DbaDbLogin } It "Should have SqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } It "Should have Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String + $CommandUnderTest | Should -HaveParameter Table -Type System.String } It "Should have SqlCms as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCms -Type String + $CommandUnderTest | Should -HaveParameter SqlCms -Type System.String } It "Should have ServersFromFile as a parameter" { - $CommandUnderTest | Should -HaveParameter ServersFromFile -Type String + $CommandUnderTest | Should -HaveParameter ServersFromFile -Type System.String } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Server[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Server[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Watch-DbaXESession.Tests.ps1 b/tests/Watch-DbaXESession.Tests.ps1 index faa34fe8c7..4003a06185 100644 --- a/tests/Watch-DbaXESession.Tests.ps1 +++ b/tests/Watch-DbaXESession.Tests.ps1 @@ -10,22 +10,22 @@ Describe "Watch-DbaXESession" { $CommandUnderTest = Get-Command Watch-DbaXESession } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Session parameter" { - $CommandUnderTest | Should -HaveParameter Session -Type String + $CommandUnderTest | Should -HaveParameter Session -Type System.String } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Session[] } It "Should have Raw parameter" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch + $CommandUnderTest | Should -HaveParameter Raw -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 } } diff --git a/tests/Write-DbaDbTableData.Tests.ps1 b/tests/Write-DbaDbTableData.Tests.ps1 index 4bb79230cf..edf405bde0 100644 --- a/tests/Write-DbaDbTableData.Tests.ps1 +++ b/tests/Write-DbaDbTableData.Tests.ps1 @@ -21,61 +21,61 @@ Describe "Write-DbaDbTableData" { $CommandUnderTest = Get-Command Write-DbaDbTableData } It "Should have SqlInstance parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Connection.ManagementConnectionType } It "Should have SqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object + $CommandUnderTest | Should -HaveParameter Database -Type Microsoft.SqlServer.Management.Smo.Database } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object } It "Should have Table parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String + $CommandUnderTest | Should -HaveParameter Table -Type System.String } It "Should have Schema parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have BatchSize parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 } It "Should have NotifyAfter parameter" { - $CommandUnderTest | Should -HaveParameter NotifyAfter -Type Int32 + $CommandUnderTest | Should -HaveParameter NotifyAfter -Type System.Int32 } It "Should have AutoCreateTable parameter" { - $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type Switch + $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type System.Management.Automation.SwitchParameter } It "Should have NoTableLock parameter" { - $CommandUnderTest | Should -HaveParameter NoTableLock -Type Switch + $CommandUnderTest | Should -HaveParameter NoTableLock -Type System.Management.Automation.SwitchParameter } It "Should have CheckConstraints parameter" { - $CommandUnderTest | Should -HaveParameter CheckConstraints -Type Switch + $CommandUnderTest | Should -HaveParameter CheckConstraints -Type System.Management.Automation.SwitchParameter } It "Should have FireTriggers parameter" { - $CommandUnderTest | Should -HaveParameter FireTriggers -Type Switch + $CommandUnderTest | Should -HaveParameter FireTriggers -Type System.Management.Automation.SwitchParameter } It "Should have KeepIdentity parameter" { - $CommandUnderTest | Should -HaveParameter KeepIdentity -Type Switch + $CommandUnderTest | Should -HaveParameter KeepIdentity -Type System.Management.Automation.SwitchParameter } It "Should have KeepNulls parameter" { - $CommandUnderTest | Should -HaveParameter KeepNulls -Type Switch + $CommandUnderTest | Should -HaveParameter KeepNulls -Type System.Management.Automation.SwitchParameter } It "Should have Truncate parameter" { - $CommandUnderTest | Should -HaveParameter Truncate -Type Switch + $CommandUnderTest | Should -HaveParameter Truncate -Type System.Management.Automation.SwitchParameter } It "Should have BulkCopyTimeOut parameter" { - $CommandUnderTest | Should -HaveParameter BulkCopyTimeOut -Type Int32 + $CommandUnderTest | Should -HaveParameter BulkCopyTimeOut -Type System.Int32 } It "Should have ColumnMap parameter" { - $CommandUnderTest | Should -HaveParameter ColumnMap -Type Hashtable + $CommandUnderTest | Should -HaveParameter ColumnMap -Type System.Collections.Hashtable } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } It "Should have UseDynamicStringLength parameter" { - $CommandUnderTest | Should -HaveParameter UseDynamicStringLength -Type Switch + $CommandUnderTest | Should -HaveParameter UseDynamicStringLength -Type System.Management.Automation.SwitchParameter } }