Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Oct 17, 2024
1 parent 38dc090 commit 15af7ad
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions tests/Backup-DbaDbCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Describe "Backup-DbaDbCertificate" {
$CommandUnderTest | Should -HaveParameter DecryptionPassword -Type SecureString
}
It "Should have Path parameter" {
$CommandUnderTest | Should -HaveParameter Path -Type FileInfo
$CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo
}
It "Should have Suffix parameter" {
$CommandUnderTest | Should -HaveParameter Suffix -Type String
}
It "Should have InputObject parameter" {
$CommandUnderTest | Should -HaveParameter InputObject -Type Certificate[]
$CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Certificate[]
}
It "Should have EnableException parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
Expand Down
2 changes: 1 addition & 1 deletion tests/Export-DbaDiagnosticQuery.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Describe "Export-DbaDiagnosticQuery" {
$CommandUnderTest | Should -HaveParameter ConvertTo -Type String -Mandatory:$false
}
It "Should have Path as a parameter" {
$CommandUnderTest | Should -HaveParameter Path -Type FileInfo -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo -Mandatory:$false
}
It "Should have Suffix as a parameter" {
$CommandUnderTest | Should -HaveParameter Suffix -Type String -Mandatory:$false
Expand Down
2 changes: 1 addition & 1 deletion tests/Export-DbaLinkedServer.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Describe "Export-DbaLinkedServer" {
$CommandUnderTest | Should -HaveParameter Append -Type Switch
}
It "Should have InputObject as a parameter" {
$CommandUnderTest | Should -HaveParameter InputObject -Type LinkedServer[]
$CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.LinkedServer[]
}
It "Should have EnableException as a switch parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
Expand Down
2 changes: 1 addition & 1 deletion tests/Export-DbaRegServer.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Describe "Export-DbaRegServer" {
$CommandUnderTest | Should -HaveParameter Path -Type String
}
It "Should have FilePath as a parameter" {
$CommandUnderTest | Should -HaveParameter FilePath -Type FileInfo
$CommandUnderTest | Should -HaveParameter FilePath -Type System.IO.FileInfo
}
It "Should have CredentialPersistenceType as a parameter" {
$CommandUnderTest | Should -HaveParameter CredentialPersistenceType -Type String
Expand Down
6 changes: 3 additions & 3 deletions tests/Find-DbaInstance.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Describe "Find-DbaInstance" {
$CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false
}
It "Should have DiscoveryType as a non-mandatory parameter of type DbaInstanceDiscoveryType" {
$CommandUnderTest | Should -HaveParameter DiscoveryType -Type DbaInstanceDiscoveryType -Mandatory:$false
$CommandUnderTest | Should -HaveParameter DiscoveryType -Type Dataplat.Dbatools.Types.DbaInstanceDiscoveryType -Mandatory:$false
}
It "Should have Credential as a non-mandatory parameter of type PSCredential" {
$CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false
Expand All @@ -18,7 +18,7 @@ Describe "Find-DbaInstance" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false
}
It "Should have ScanType as a non-mandatory parameter of type DbaInstanceScanType[]" {
$CommandUnderTest | Should -HaveParameter ScanType -Type DbaInstanceScanType[] -Mandatory:$false
$CommandUnderTest | Should -HaveParameter ScanType -Type Dataplat.Dbatools.Types.DbaInstanceScanType[] -Mandatory:$false
}
It "Should have IpAddress as a non-mandatory parameter of type String[]" {
$CommandUnderTest | Should -HaveParameter IpAddress -Type String[] -Mandatory:$false
Expand All @@ -30,7 +30,7 @@ Describe "Find-DbaInstance" {
$CommandUnderTest | Should -HaveParameter TCPPort -Type Int32[] -Mandatory:$false
}
It "Should have MinimumConfidence as a non-mandatory parameter of type DbaInstanceConfidenceLevel" {
$CommandUnderTest | Should -HaveParameter MinimumConfidence -Type DbaInstanceConfidenceLevel -Mandatory:$false
$CommandUnderTest | Should -HaveParameter MinimumConfidence -Type Dataplat.Dbatools.Types.DbaInstanceConfidenceLevel -Mandatory:$false
}
It "Should have EnableException as a non-mandatory switch parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false
Expand Down
2 changes: 1 addition & 1 deletion tests/Get-DbaCmObject.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Describe "Get-DbaCmObject" {
$CommandUnderTest | Should -HaveParameter Namespace -Type String -Mandatory:$false
}
It "Should have DoNotUse as a non-mandatory ManagementConnectionType[] parameter" {
$CommandUnderTest | Should -HaveParameter DoNotUse -Type ManagementConnectionType[] -Mandatory:$false
$CommandUnderTest | Should -HaveParameter DoNotUse -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] -Mandatory:$false
}
It "Should have Force as a non-mandatory Switch" {
$CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false
Expand Down
4 changes: 2 additions & 2 deletions tests/Import-DbaBinaryFile.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ Describe "Import-DbaBinaryFile" {
$CommandUnderTest | Should -HaveParameter InputObject -Type [Microsoft.SqlServer.Management.Smo.Table[]]
}
It "Should have FilePath as a parameter" {
$CommandUnderTest | Should -HaveParameter FilePath -Type FileInfo[]
$CommandUnderTest | Should -HaveParameter FilePath -Type System.IO.FileInfo[]
}
It "Should have Path as a parameter" {
$CommandUnderTest | Should -HaveParameter Path -Type FileInfo[]
$CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo[]
}
It "Should have EnableException as a switch parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch
Expand Down
2 changes: 1 addition & 1 deletion tests/Invoke-DbaDiagnosticQuery.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Describe "Invoke-DbaDiagnosticQuery" {
$CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential
}
It "Should have Path as a parameter" {
$CommandUnderTest | Should -HaveParameter Path -Type FileInfo
$CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo
}
It "Should have QueryName as a parameter" {
$CommandUnderTest | Should -HaveParameter QueryName -Type String[]
Expand Down
2 changes: 1 addition & 1 deletion tests/Invoke-DbatoolsRenameHelper.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Get-DbaStub {
$CommandUnderTest = Get-Command Invoke-DbatoolsRenameHelper
}
It "Should have InputObject as a parameter" {
$CommandUnderTest | Should -HaveParameter InputObject -Type FileInfo[] -Mandatory:$false
$CommandUnderTest | Should -HaveParameter InputObject -Type System.IO.FileInfo[] -Mandatory:$false
}
It "Should have Encoding as a parameter" {
$CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false
Expand Down
2 changes: 1 addition & 1 deletion tests/New-DbaCmConnection.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Describe "New-DbaCmConnection" {
$CommandUnderTest | Should -HaveParameter OverrideExplicitCredential -Type switch
}
It "Should have DisabledConnectionTypes as a parameter" {
$CommandUnderTest | Should -HaveParameter DisabledConnectionTypes -Type ManagementConnectionType
$CommandUnderTest | Should -HaveParameter DisabledConnectionTypes -Type Dataplat.Dbatools.Connection.ManagementConnectionType
}
It "Should have DisableBadCredentialCache as a switch parameter" {
$CommandUnderTest | Should -HaveParameter DisableBadCredentialCache -Type switch
Expand Down
2 changes: 1 addition & 1 deletion tests/New-DbaLinkedServerLogin.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Describe "New-DbaLinkedServerLogin" {
$CommandUnderTest | Should -HaveParameter Impersonate -Type Switch -Mandatory:$false
}
It "Should have InputObject parameter" {
$CommandUnderTest | Should -HaveParameter InputObject -Type LinkedServer[] -Mandatory:$false
$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
Expand Down
2 changes: 1 addition & 1 deletion tests/Remove-DbaDbCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Describe "Remove-DbaDbCertificate Unit Tests" -Tag 'UnitTests' {
}

It "Should have InputObject parameter" {
$command | Should -HaveParameter InputObject -Type Certificate[] -Mandatory:$false
$command | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Certificate[] -Mandatory:$false
}

It "Should have EnableException parameter" {
Expand Down
2 changes: 1 addition & 1 deletion tests/Save-DbaDiagnosticQueryScript.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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 FileInfo -Mandatory:$false
$CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo -Mandatory:$false
}
It "Should have EnableException as a non-mandatory switch parameter" {
$CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false
Expand Down
2 changes: 1 addition & 1 deletion tests/Set-DbaCmConnection.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Describe "Set-DbaCmConnection" {
$CommandUnderTest | Should -HaveParameter OverrideConnectionPolicy -Type Switch -Mandatory:$false
}
It "Should have DisabledConnectionTypes parameter" {
$CommandUnderTest | Should -HaveParameter DisabledConnectionTypes -Type ManagementConnectionType -Mandatory:$false
$CommandUnderTest | Should -HaveParameter DisabledConnectionTypes -Type Dataplat.Dbatools.Connection.ManagementConnectionType -Mandatory:$false
}
It "Should have DisableBadCredentialCache parameter" {
$CommandUnderTest | Should -HaveParameter DisableBadCredentialCache -Type Switch -Mandatory:$false
Expand Down
2 changes: 1 addition & 1 deletion tests/Test-DbaCmConnection.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Describe "Test-DbaCmConnection" {
$CommandUnderTest | Should -HaveParameter Credential -Type PSCredential
}
It "Should have Type as a parameter" {
$CommandUnderTest | Should -HaveParameter Type -Type ManagementConnectionType[]
$CommandUnderTest | Should -HaveParameter Type -Type Dataplat.Dbatools.Connection.ManagementConnectionType[]
}
It "Should have Force as a switch parameter" {
$CommandUnderTest | Should -HaveParameter Force -Type switch
Expand Down

0 comments on commit 15af7ad

Please sign in to comment.