From 2b69f17b41720e50e36cd17dbd8fd37f22606c34 Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Fri, 18 Oct 2024 15:27:12 +0200 Subject: [PATCH] name to full name using gpt-4o-mini --- tests/Add-DbaAgDatabase.Tests.ps1 | 40 ++--- tests/Add-DbaAgListener.Tests.ps1 | 40 ++--- tests/Add-DbaAgReplica.Tests.ps1 | 38 ++-- tests/Add-DbaComputerCertificate.Tests.ps1 | 16 +- tests/Add-DbaDbMirrorMonitor.Tests.ps1 | 10 +- tests/Add-DbaExtendedProperty.Tests.ps1 | 14 +- tests/Add-DbaPfDataCollectorCounter.Tests.ps1 | 28 +-- tests/Add-DbaRegServer.Tests.ps1 | 34 ++-- tests/Add-DbaRegServerGroup.Tests.ps1 | 8 +- tests/Add-DbaReplArticle.Tests.ps1 | 12 +- tests/Add-DbaServerRoleMember.Tests.ps1 | 10 +- tests/Backup-DbaComputerCertificate.Tests.ps1 | 20 +-- tests/Backup-DbaDatabase.Tests.ps1 | 68 ++++---- tests/Backup-DbaDbCertificate.Tests.ps1 | 18 +- tests/Backup-DbaDbMasterKey.Tests.ps1 | 30 ++-- tests/Backup-DbaServiceMasterKey.Tests.ps1 | 26 +-- tests/Clear-DbaConnectionPool.Tests.ps1 | 10 +- tests/Clear-DbaLatchStatistics.Tests.ps1 | 10 +- tests/Clear-DbaPlanCache.Tests.ps1 | 10 +- tests/Clear-DbaWaitStatistics.Tests.ps1 | 10 +- tests/Connect-DbaInstance.Tests.ps1 | 58 +++---- tests/Convert-DbaLsn.Tests.ps1 | 4 +- tests/Convert-DbaMaskingValue.Tests.ps1 | 8 +- tests/ConvertTo-DbaDataTable.Tests.ps1 | 14 +- tests/ConvertTo-DbaTimeline.Tests.ps1 | 6 +- tests/ConvertTo-DbaXESession.Tests.ps1 | 8 +- tests/Copy-DbaAgentJob.Tests.ps1 | 20 +-- tests/Copy-DbaAgentJobCategory.Tests.ps1 | 20 +-- tests/Copy-DbaAgentProxy.Tests.ps1 | 16 +- tests/Copy-DbaAgentSchedule.Tests.ps1 | 16 +- tests/Copy-DbaAgentServer.Tests.ps1 | 8 +- tests/Copy-DbaBackupDevice.Tests.ps1 | 10 +- tests/Copy-DbaCredential.Tests.ps1 | 22 +-- tests/Copy-DbaCustomError.Tests.ps1 | 16 +- tests/Copy-DbaDataCollector.Tests.ps1 | 18 +- tests/Copy-DbaDatabase.Tests.ps1 | 16 +- tests/Copy-DbaDbAssembly.Tests.ps1 | 73 +------- tests/Copy-DbaDbCertificate.Tests.ps1 | 26 +-- tests/Copy-DbaDbMail.Tests.ps1 | 14 +- tests/Copy-DbaDbQueryStoreOption.Tests.ps1 | 18 +- tests/Copy-DbaDbTableData.Tests.ps1 | 48 +++--- tests/Copy-DbaDbViewData.Tests.ps1 | 84 ++++----- tests/Copy-DbaEndpoint.Tests.ps1 | 16 +- tests/Copy-DbaInstanceAudit.Tests.ps1 | 18 +- ...py-DbaInstanceAuditSpecification.Tests.ps1 | 16 +- tests/Copy-DbaInstanceTrigger.Tests.ps1 | 12 +- tests/Copy-DbaLinkedServer.Tests.ps1 | 20 +-- tests/Copy-DbaLogin.Tests.ps1 | 34 ++-- tests/Copy-DbaPolicyManagement.Tests.ps1 | 20 +-- tests/Copy-DbaRegServer.Tests.ps1 | 16 +- tests/Copy-DbaSpConfigure.Tests.ps1 | 14 +- tests/Copy-DbaSsisCatalog.Tests.ps1 | 22 +-- tests/Copy-DbaStartupProcedure.Tests.ps1 | 16 +- tests/Copy-DbaSystemDbUserObject.Tests.ps1 | 14 +- tests/Copy-DbaXESession.Tests.ps1 | 16 +- tests/Copy-DbaXESessionTemplate.Tests.ps1 | 10 +- tests/Disable-DbaAgHadr.Tests.ps1 | 8 +- tests/Disable-DbaDbEncryption.Tests.ps1 | 6 +- tests/Disable-DbaFilestream.Tests.ps1 | 8 +- ...isable-DbaForceNetworkEncryption.Tests.ps1 | 6 +- tests/Disable-DbaHideInstance.Tests.ps1 | 6 +- tests/Disable-DbaReplDistributor.Tests.ps1 | 8 +- tests/Disable-DbaReplPublishing.Tests.ps1 | 8 +- tests/Disable-DbaStartupProcedure.Tests.ps1 | 10 +- tests/Disable-DbaTraceFlag.Tests.ps1 | 8 +- tests/Disconnect-DbaInstance.Tests.ps1 | 8 +- tests/Dismount-DbaDatabase.Tests.ps1 | 8 +- tests/Enable-DbaAgHadr.Tests.ps1 | 8 +- tests/Enable-DbaDbEncryption.Tests.ps1 | 12 +- tests/Enable-DbaFilestream.Tests.ps1 | 14 +- ...Enable-DbaForceNetworkEncryption.Tests.ps1 | 6 +- tests/Enable-DbaHideInstance.Tests.ps1 | 6 +- tests/Enable-DbaReplDistributor.Tests.ps1 | 18 +- tests/Enable-DbaReplPublishing.Tests.ps1 | 14 +- tests/Enable-DbaStartupProcedure.Tests.ps1 | 8 +- tests/Enable-DbaTraceFlag.Tests.ps1 | 8 +- tests/Expand-DbaDbLogFile.Tests.ps1 | 20 +-- tests/Export-DbaBinaryFile.Tests.ps1 | 18 +- tests/Export-DbaCredential.Tests.ps1 | 18 +- tests/Export-DbaDacPackage.Tests.ps1 | 48 +++--- tests/Export-DbaDbRole.Tests.ps1 | 34 ++-- tests/Export-DbaDbTableData.Tests.ps1 | 18 +- tests/Export-DbaDiagnosticQuery.Tests.ps1 | 12 +- tests/Export-DbaExecutionPlan.Tests.ps1 | 18 +- tests/Export-DbaInstance.Tests.ps1 | 44 ++--- tests/Export-DbaLinkedServer.Tests.ps1 | 16 +- tests/Export-DbaLogin.Tests.ps1 | 42 ++--- ...rt-DbaPfDataCollectorSetTemplate.Tests.ps1 | 14 +- tests/Export-DbaRegServer.Tests.ps1 | 14 +- tests/Export-DbaReplServerSetting.Tests.ps1 | 28 +-- tests/Export-DbaScript.Tests.ps1 | 22 +-- tests/Export-DbaServerRole.Tests.ps1 | 30 ++-- tests/Export-DbaSpConfigure.Tests.ps1 | 10 +- tests/Export-DbaSysDbUserObject.Tests.ps1 | 22 +-- tests/Export-DbaUser.Tests.ps1 | 16 +- tests/Export-DbaXECsv.Tests.ps1 | 8 +- tests/Export-DbaXESession.Tests.ps1 | 14 +- tests/Export-DbaXESessionTemplate.Tests.ps1 | 24 +-- tests/Find-DbaAgentJob.Tests.ps1 | 28 +-- tests/Find-DbaBackup.Tests.ps1 | 10 +- tests/Find-DbaCommand.Tests.ps1 | 14 +- tests/Find-DbaDatabase.Tests.ps1 | 12 +- tests/Find-DbaDbDisabledIndex.Tests.ps1 | 14 +- tests/Find-DbaDbDuplicateIndex.Tests.ps1 | 10 +- tests/Find-DbaDbGrowthEvent.Tests.ps1 | 14 +- tests/Find-DbaDbUnusedIndex.Tests.ps1 | 18 +- tests/Find-DbaInstance.Tests.ps1 | 40 ++--- tests/Find-DbaLoginInGroup.Tests.ps1 | 8 +- tests/Find-DbaOrphanedFile.Tests.ps1 | 16 +- tests/Find-DbaSimilarTable.Tests.ps1 | 26 +-- tests/Find-DbaStoredProcedure.Tests.ps1 | 16 +- tests/Find-DbaTrigger.Tests.ps1 | 18 +- tests/Find-DbaUserObject.Tests.ps1 | 8 +- tests/Find-DbaView.Tests.ps1 | 16 +- tests/Format-DbaBackupInformation.Tests.ps1 | 28 +-- tests/Get-DbaAgBackupHistory.Tests.ps1 | 62 +++---- tests/Get-DbaAgDatabase.Tests.ps1 | 6 +- tests/Get-DbaAgHadr.Tests.ps1 | 6 +- tests/Get-DbaAgReplica.Tests.ps1 | 10 +- tests/Get-DbaAgentAlertCategory.Tests.ps1 | 8 +- tests/Get-DbaAgentJob.Tests.ps1 | 18 +- tests/Get-DbaAgentJobCategory.Tests.ps1 | 10 +- tests/Get-DbaAgentJobHistory.Tests.ps1 | 16 +- tests/Get-DbaAgentJobOutputFile.Tests.ps1 | 6 +- tests/Get-DbaAgentJobStep.Tests.ps1 | 12 +- tests/Get-DbaAgentLog.Tests.ps1 | 8 +- tests/Get-DbaAgentOperator.Tests.ps1 | 10 +- tests/Get-DbaAgentProxy.Tests.ps1 | 10 +- tests/Get-DbaAgentSchedule.Tests.ps1 | 12 +- tests/Get-DbaAgentServer.Tests.ps1 | 6 +- tests/Get-DbaAvailabilityGroup.Tests.ps1 | 10 +- tests/Get-DbaAvailableCollation.Tests.ps1 | 6 +- tests/Get-DbaBackupDevice.Tests.ps1 | 10 +- tests/Get-DbaBackupInformation.Tests.ps1 | 36 ++-- tests/Get-DbaBinaryFileTable.Tests.ps1 | 12 +- tests/Get-DbaBuild.Tests.ps1 | 18 +- tests/Get-DbaClientAlias.Tests.ps1 | 10 +- tests/Get-DbaClientProtocol.Tests.ps1 | 6 +- tests/Get-DbaCmConnection.Tests.ps1 | 10 +- tests/Get-DbaCmObject.Tests.ps1 | 34 ++-- tests/Get-DbaComputerCertificate.Tests.ps1 | 30 ++-- tests/Get-DbaComputerSystem.Tests.ps1 | 8 +- tests/Get-DbaConnection.Tests.ps1 | 10 +- tests/Get-DbaCpuRingBuffer.Tests.ps1 | 8 +- tests/Get-DbaCpuUsage.Tests.ps1 | 10 +- tests/Get-DbaCredential.Tests.ps1 | 10 +- tests/Get-DbaCustomError.Tests.ps1 | 10 +- tests/Get-DbaDBFileGroup.Tests.ps1 | 10 +- tests/Get-DbaDatabase.Tests.ps1 | 56 +++--- tests/Get-DbaDbAssembly.Tests.ps1 | 10 +- tests/Get-DbaDbAsymmetricKey.Tests.ps1 | 12 +- tests/Get-DbaDbBackupHistory.Tests.ps1 | 11 +- tests/Get-DbaDbCertificate.Tests.ps1 | 14 +- tests/Get-DbaDbCheckConstraint.Tests.ps1 | 12 +- tests/Get-DbaDbCompatibility.Tests.ps1 | 8 +- tests/Get-DbaDbCompression.Tests.ps1 | 12 +- tests/Get-DbaDbDbccOpenTran.Tests.ps1 | 8 +- tests/Get-DbaDbDetachedFileInfo.Tests.ps1 | 8 +- tests/Get-DbaDbEncryption.Tests.ps1 | 12 +- tests/Get-DbaDbEncryptionKey.Tests.ps1 | 10 +- tests/Get-DbaDbExtentDiff.Tests.ps1 | 10 +- tests/Get-DbaDbFeatureUsage.Tests.ps1 | 10 +- tests/Get-DbaDbFile.Tests.ps1 | 12 +- tests/Get-DbaDbFileGrowth.Tests.ps1 | 14 +- tests/Get-DbaDbFileMapping.Tests.ps1 | 8 +- tests/Get-DbaDbForeignKey.Tests.ps1 | 12 +- tests/Get-DbaDbIdentity.Tests.ps1 | 6 +- tests/Get-DbaDbLogShipError.Tests.ps1 | 20 +-- tests/Get-DbaDbLogSpace.Tests.ps1 | 12 +- tests/Get-DbaDbMail.Tests.ps1 | 10 +- tests/Get-DbaDbMailAccount.Tests.ps1 | 18 +- tests/Get-DbaDbMailConfig.Tests.ps1 | 8 +- tests/Get-DbaDbMailHistory.Tests.ps1 | 10 +- tests/Get-DbaDbMailLog.Tests.ps1 | 10 +- tests/Get-DbaDbMailProfile.Tests.ps1 | 10 +- tests/Get-DbaDbMailServer.Tests.ps1 | 18 +- tests/Get-DbaDbMasterKey.Tests.ps1 | 10 +- tests/Get-DbaDbMemoryUsage.Tests.ps1 | 12 +- tests/Get-DbaDbMirror.Tests.ps1 | 4 +- tests/Get-DbaDbMirrorMonitor.Tests.ps1 | 12 +- tests/Get-DbaDbObjectTrigger.Tests.ps1 | 10 +- tests/Get-DbaDbOrphanUser.Tests.ps1 | 10 +- tests/Get-DbaDbPageInfo.Tests.ps1 | 22 +-- tests/Get-DbaDbPartitionFunction.Tests.ps1 | 14 +- tests/Get-DbaDbPartitionScheme.Tests.ps1 | 22 +-- tests/Get-DbaDbQueryStoreOption.Tests.ps1 | 10 +- tests/Get-DbaDbRecoveryModel.Tests.ps1 | 8 +- tests/Get-DbaDbRestoreHistory.Tests.ps1 | 18 +- tests/Get-DbaDbRole.Tests.ps1 | 12 +- tests/Get-DbaDbRoleMember.Tests.ps1 | 20 +-- tests/Get-DbaDbSchema.Tests.ps1 | 16 +- tests/Get-DbaDbSequence.Tests.ps1 | 6 +- tests/Get-DbaDbServiceBrokerQueue.Tests.ps1 | 12 +- tests/Get-DbaDbServiceBrokerService.Tests.ps1 | 12 +- tests/Get-DbaDbSnapshot.Tests.ps1 | 14 +- tests/Get-DbaDbSpace.Tests.ps1 | 20 +-- tests/Get-DbaDbState.Tests.ps1 | 10 +- tests/Get-DbaDbStoredProcedure.Tests.ps1 | 28 +-- tests/Get-DbaDbSynonym.Tests.ps1 | 8 +- tests/Get-DbaDbTable.Tests.ps1 | 12 +- tests/Get-DbaDbTrigger.Tests.ps1 | 10 +- tests/Get-DbaDbUdf.Tests.ps1 | 20 +-- tests/Get-DbaDbUser.Tests.ps1 | 12 +- tests/Get-DbaDbUserDefinedTableType.Tests.ps1 | 12 +- tests/Get-DbaDbView.Tests.ps1 | 18 +- tests/Get-DbaDbVirtualLogFile.Tests.ps1 | 12 +- tests/Get-DbaDbccHelp.Tests.ps1 | 16 +- tests/Get-DbaDbccMemoryStatus.Tests.ps1 | 6 +- tests/Get-DbaDbccProcCache.Tests.ps1 | 6 +- tests/Get-DbaDbccSessionBuffer.Tests.ps1 | 14 +- tests/Get-DbaDbccStatistic.Tests.ps1 | 16 +- tests/Get-DbaDbccUserOption.Tests.ps1 | 14 +- tests/Get-DbaDefaultPath.Tests.ps1 | 6 +- tests/Get-DbaDependency.Tests.ps1 | 10 +- tests/Get-DbaDeprecatedFeature.Tests.ps1 | 10 +- tests/Get-DbaDiskSpace.Tests.ps1 | 16 +- tests/Get-DbaDump.Tests.ps1 | 6 +- tests/Get-DbaEndpoint.Tests.ps1 | 10 +- tests/Get-DbaErrorLog.Tests.ps1 | 16 +- tests/Get-DbaErrorLogConfig.Tests.ps1 | 6 +- .../Get-DbaEstimatedCompletionTime.Tests.ps1 | 10 +- tests/Get-DbaExecutionPlan.Tests.ps1 | 18 +- tests/Get-DbaExtendedProperty.Tests.ps1 | 6 +- tests/Get-DbaExtendedProtection.Tests.ps1 | 10 +- tests/Get-DbaExternalProcess.Tests.ps1 | 6 +- tests/Get-DbaFeature.Tests.ps1 | 6 +- tests/Get-DbaFile.Tests.ps1 | 22 +-- tests/Get-DbaFilestream.Tests.ps1 | 12 +- tests/Get-DbaFirewallRule.Tests.ps1 | 8 +- tests/Get-DbaForceNetworkEncryption.Tests.ps1 | 6 +- tests/Get-DbaHelpIndex.Tests.ps1 | 22 +-- tests/Get-DbaHideInstance.Tests.ps1 | 6 +- tests/Get-DbaInstalledPatch.Tests.ps1 | 8 +- tests/Get-DbaInstanceAudit.Tests.ps1 | 10 +- ...et-DbaInstanceAuditSpecification.Tests.ps1 | 6 +- tests/Get-DbaInstanceInstallDate.Tests.ps1 | 10 +- tests/Get-DbaInstanceProperty.Tests.ps1 | 18 +- tests/Get-DbaInstanceProtocol.Tests.ps1 | 10 +- tests/Get-DbaInstanceTrigger.Tests.ps1 | 6 +- tests/Get-DbaInstanceUserOption.Tests.ps1 | 6 +- tests/Get-DbaIoLatency.Tests.ps1 | 6 +- tests/Get-DbaKbUpdate.Tests.ps1 | 16 +- tests/Get-DbaLastBackup.Tests.ps1 | 12 +- tests/Get-DbaLastGoodCheckDb.Tests.ps1 | 12 +- tests/Get-DbaLatchStatistic.Tests.ps1 | 8 +- tests/Get-DbaLinkedServer.Tests.ps1 | 18 +- tests/Get-DbaLinkedServerLogin.Tests.ps1 | 12 +- tests/Get-DbaLocaleSetting.Tests.ps1 | 10 +- tests/Get-DbaLogin.Tests.ps1 | 24 +-- tests/Get-DbaMaintenanceSolutionLog.Tests.ps1 | 12 +- tests/Get-DbaManagementObject.Tests.ps1 | 8 +- tests/Get-DbaMaxMemory.Tests.ps1 | 6 +- tests/Get-DbaMemoryCondition.Tests.ps1 | 6 +- tests/Get-DbaMemoryUsage.Tests.ps1 | 16 +- tests/Get-DbaModule.Tests.ps1 | 30 ++-- tests/Get-DbaMsdtc.Tests.ps1 | 6 +- tests/Get-DbaNetworkActivity.Tests.ps1 | 10 +- tests/Get-DbaNetworkCertificate.Tests.ps1 | 6 +- tests/Get-DbaNetworkConfiguration.Tests.ps1 | 8 +- tests/Get-DbaOleDbProvider.Tests.ps1 | 14 +- tests/Get-DbaOpenTransaction.Tests.ps1 | 6 +- tests/Get-DbaOperatingSystem.Tests.ps1 | 6 +- tests/Get-DbaPageFileSetting.Tests.ps1 | 10 +- tests/Get-DbaPbmCategory.Tests.ps1 | 8 +- .../Get-DbaPbmCategorySubscription.Tests.ps1 | 12 +- tests/Get-DbaPbmCondition.Tests.ps1 | 20 +-- tests/Get-DbaPbmObjectSet.Tests.ps1 | 12 +- tests/Get-DbaPbmPolicy.Tests.ps1 | 8 +- tests/Get-DbaPbmStore.Tests.ps1 | 6 +- tests/Get-DbaPermission.Tests.ps1 | 14 +- tests/Get-DbaPfAvailableCounter.Tests.ps1 | 8 +- tests/Get-DbaPfDataCollector.Tests.ps1 | 12 +- tests/Get-DbaPfDataCollectorCounter.Tests.ps1 | 14 +- ...-DbaPfDataCollectorCounterSample.Tests.ps1 | 22 +-- tests/Get-DbaPfDataCollectorSet.Tests.ps1 | 14 +- ...et-DbaPfDataCollectorSetTemplate.Tests.ps1 | 16 +- tests/Get-DbaPlanCache.Tests.ps1 | 6 +- tests/Get-DbaPowerPlan.Tests.ps1 | 4 +- tests/Get-DbaPrivilege.Tests.ps1 | 8 +- tests/Get-DbaProcess.Tests.ps1 | 12 +- tests/Get-DbaProductKey.Tests.ps1 | 14 +- tests/Get-DbaQueryExecutionTime.Tests.ps1 | 32 ++-- tests/Get-DbaRandomizedDataset.Tests.ps1 | 22 +-- ...Get-DbaRandomizedDatasetTemplate.Tests.ps1 | 12 +- tests/Get-DbaRandomizedType.Tests.ps1 | 14 +- tests/Get-DbaRandomizedValue.Tests.ps1 | 54 +++--- tests/Get-DbaRegServer.Tests.ps1 | 22 +-- tests/Get-DbaRegServerGroup.Tests.ps1 | 8 +- tests/Get-DbaRegServerStore.Tests.ps1 | 6 +- tests/Get-DbaRegistryRoot.Tests.ps1 | 10 +- tests/Get-DbaReplArticle.Tests.ps1 | 26 +-- tests/Get-DbaReplArticleColumn.Tests.ps1 | 26 +-- tests/Get-DbaReplDistributor.Tests.ps1 | 6 +- tests/Get-DbaReplPublication.Tests.ps1 | 12 +- tests/Get-DbaReplPublisher.Tests.ps1 | 6 +- tests/Get-DbaReplServer.Tests.ps1 | 6 +- tests/Get-DbaReplSubscription.Tests.ps1 | 16 +- tests/Get-DbaResourceGovernor.Tests.ps1 | 6 +- tests/Get-DbaRgClassifierFunction.Tests.ps1 | 6 +- tests/Get-DbaRgResourcePool.Tests.ps1 | 4 +- tests/Get-DbaRunningJob.Tests.ps1 | 10 +- tests/Get-DbaSchemaChangeHistory.Tests.ps1 | 26 +-- tests/Get-DbaServerRole.Tests.ps1 | 8 +- tests/Get-DbaServerRoleMember.Tests.ps1 | 14 +- tests/Get-DbaService.Tests.ps1 | 20 +-- tests/Get-DbaSpinLockStatistic.Tests.ps1 | 6 +- tests/Get-DbaSpn.Tests.ps1 | 8 +- .../Get-DbaSsisEnvironmentVariable.Tests.ps1 | 14 +- tests/Get-DbaSsisExecutionHistory.Tests.ps1 | 16 +- tests/Get-DbaStartupParameter.Tests.ps1 | 12 +- tests/Get-DbaStartupProcedure.Tests.ps1 | 8 +- tests/Get-DbaSuspectPage.Tests.ps1 | 8 +- tests/Get-DbaTcpPort.Tests.ps1 | 12 +- tests/Get-DbaTempdbUsage.Tests.ps1 | 6 +- tests/Get-DbaTopResourceUsage.Tests.ps1 | 20 +-- tests/Get-DbaTrace.Tests.ps1 | 10 +- tests/Get-DbaTraceFlag.Tests.ps1 | 14 +- tests/Get-DbaUpTime.Tests.ps1 | 8 +- tests/Get-DbaUserPermission.Tests.ps1 | 18 +- tests/Get-DbaWaitResource.Tests.ps1 | 10 +- tests/Get-DbaWaitStatistic.Tests.ps1 | 8 +- tests/Get-DbaWaitingTask.Tests.ps1 | 6 +- tests/Get-DbaWindowsLog.Tests.ps1 | 14 +- tests/Get-DbaWsfcAvailableDisk.Tests.ps1 | 8 +- tests/Get-DbaWsfcCluster.Tests.ps1 | 6 +- tests/Get-DbaWsfcDisk.Tests.ps1 | 10 +- tests/Get-DbaWsfcNetwork.Tests.ps1 | 6 +- tests/Get-DbaWsfcNetworkInterface.Tests.ps1 | 6 +- tests/Get-DbaWsfcNode.Tests.ps1 | 10 +- tests/Get-DbaWsfcResource.Tests.ps1 | 8 +- tests/Get-DbaWsfcResourceGroup.Tests.ps1 | 14 +- tests/Get-DbaWsfcResourceType.Tests.ps1 | 6 +- tests/Get-DbaWsfcRole.Tests.ps1 | 6 +- tests/Get-DbaWsfcSharedVolume.Tests.ps1 | 6 +- tests/Get-DbaXEObject.Tests.ps1 | 4 +- tests/Get-DbaXESession.Tests.ps1 | 14 +- tests/Get-DbaXESessionTarget.Tests.ps1 | 18 +- tests/Get-DbaXESessionTargetFile.Tests.ps1 | 10 +- tests/Get-DbaXESessionTemplate.Tests.ps1 | 16 +- tests/Get-DbaXESmartTarget.Tests.ps1 | 2 +- tests/Get-DbaXEStore.Tests.ps1 | 6 +- tests/Get-DbatoolsChangeLog.Tests.ps1 | 2 +- tests/Get-DbatoolsConfig.Tests.ps1 | 18 +- tests/Get-DbatoolsConfigValue.Tests.ps1 | 6 +- tests/Get-DbatoolsLog.Tests.ps1 | 42 ++--- tests/Get-DbatoolsPath.Tests.ps1 | 2 +- tests/Get-DirectoryRestoreFile.Tests.ps1 | 16 +- tests/Get-ObjectNameParts.Tests.ps1 | 4 +- tests/Get-SqlDefaultSpConfigure.Tests.ps1 | 4 +- tests/Get-XpDirTreeRestoreFile.Tests.ps1 | 6 +- tests/Grant-DbaAgPermission.Tests.ps1 | 10 +- tests/Import-DbaBinaryFile.Tests.ps1 | 20 +-- tests/Import-DbaCsv.Tests.ps1 | 74 ++++---- ...rt-DbaPfDataCollectorSetTemplate.Tests.ps1 | 40 ++--- tests/Import-DbaRegServer.Tests.ps1 | 8 +- tests/Import-DbaSpConfigure.Tests.ps1 | 18 +- tests/Import-DbaXESessionTemplate.Tests.ps1 | 14 +- tests/Import-DbatoolsConfig.Tests.ps1 | 32 ++-- tests/InModule.Help.Tests.ps1 | 10 +- tests/Install-DbaAgentAdminAlert.Tests.ps1 | 32 ++-- tests/Install-DbaDarlingData.Tests.ps1 | 16 +- tests/Install-DbaFirstResponderKit.Tests.ps1 | 16 +- tests/Install-DbaInstance.Tests.ps1 | 72 ++++---- .../Install-DbaMaintenanceSolution.Tests.ps1 | 32 ++-- tests/Install-DbaMultiTool.Tests.ps1 | 14 +- tests/Install-DbaSqlWatch.Tests.ps1 | 14 +- tests/Install-DbaWhoIsActive.Tests.ps1 | 16 +- tests/Invoke-DbaAdvancedInstall.Tests.ps1 | 32 ++-- tests/Invoke-DbaAdvancedRestore.Tests.ps1 | 44 ++--- tests/Invoke-DbaAdvancedUpdate.Tests.ps1 | 18 +- tests/Invoke-DbaAgFailover.Tests.ps1 | 10 +- tests/Invoke-DbaAzSqlDbTip.Tests.ps1 | 22 +-- tests/Invoke-DbaBalanceDataFiles.Tests.ps1 | 14 +- tests/Invoke-DbaCycleErrorLog.Tests.ps1 | 8 +- tests/Invoke-DbaDbClone.Tests.ps1 | 16 +- tests/Invoke-DbaDbCorruption.Tests.ps1 | 6 +- tests/Invoke-DbaDbDataGenerator.Tests.ps1 | 24 +-- tests/Invoke-DbaDbDataMasking.Tests.ps1 | 38 ++-- .../Invoke-DbaDbDbccCheckConstraint.Tests.ps1 | 16 +- tests/Invoke-DbaDbDbccCleanTable.Tests.ps1 | 14 +- tests/Invoke-DbaDbDbccUpdateUsage.Tests.ps1 | 16 +- tests/Invoke-DbaDbDecryptObject.Tests.ps1 | 14 +- tests/Invoke-DbaDbLogShipRecovery.Tests.ps1 | 14 +- tests/Invoke-DbaDbLogShipping.Tests.ps1 | 162 +++++++++--------- tests/Invoke-DbaDbMirrorFailover.Tests.ps1 | 10 +- tests/Invoke-DbaDbMirroring.Tests.ps1 | 26 +-- tests/Invoke-DbaDbPiiScan.Tests.ps1 | 30 ++-- tests/Invoke-DbaDbShrink.Tests.ps1 | 26 +-- tests/Invoke-DbaDbTransfer.Tests.ps1 | 12 +- tests/Invoke-DbaDbUpgrade.Tests.ps1 | 22 +-- tests/Invoke-DbaDbccDropCleanBuffer.Tests.ps1 | 4 +- tests/Invoke-DbaDbccFreeCache.Tests.ps1 | 14 +- tests/Invoke-DbaDiagnosticQuery.Tests.ps1 | 30 ++-- tests/Invoke-DbaPfRelog.Tests.ps1 | 68 ++++---- tests/Invoke-DbaQuery.Tests.ps1 | 30 ++-- tests/Invoke-DbaWhoisActive.Tests.ps1 | 54 +++--- tests/Invoke-DbaXEReplay.Tests.ps1 | 10 +- tests/Invoke-DbatoolsFormatter.Tests.ps1 | 4 +- tests/Invoke-DbatoolsRenameHelper.Tests.ps1 | 6 +- tests/Join-DbaAvailabilityGroup.Tests.ps1 | 10 +- tests/Join-DbaPath.Tests.ps1 | 6 +- tests/Measure-DbaDbVirtualLogFile.Tests.ps1 | 20 +-- .../Measure-DbaDiskSpaceRequirement.Tests.ps1 | 16 +- tests/Mount-DbaDatabase.Tests.ps1 | 8 +- tests/Move-DbaDbFile.Tests.ps1 | 20 +-- tests/Move-DbaRegServer.Tests.ps1 | 12 +- tests/Set-DbaAgentJobStep.Tests.ps1 | 4 +- ...272 Measure-DbaBackupThroughput.Tests.ps1" | 60 +++++++ 408 files changed, 3233 insertions(+), 3229 deletions(-) create mode 100644 "tests/Updated File\357\200\272 Measure-DbaBackupThroughput.Tests.ps1" diff --git a/tests/Add-DbaAgDatabase.Tests.ps1 b/tests/Add-DbaAgDatabase.Tests.ps1 index a28c7aada7..fa4f620c8a 100644 --- a/tests/Add-DbaAgDatabase.Tests.ps1 +++ b/tests/Add-DbaAgDatabase.Tests.ps1 @@ -11,41 +11,41 @@ Describe "Add-DbaAgDatabase" { BeforeAll { $CommandUnderTest = Get-Command Add-DbaAgDatabase } - 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 AvailabilityGroup as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String -Mandatory:$false + It "Should have AvailabilityGroup as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String -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 Secondary as a non-mandatory parameter of type DbaInstanceParameter[]" { - $CommandUnderTest | Should -HaveParameter Secondary -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have Secondary as a non-mandatory parameter of type Dataplat.Dbatools.Parameter.DbaInstanceParameter[]" { + $CommandUnderTest | Should -HaveParameter Secondary -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } - It "Should have SecondarySqlCredential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type PSCredential -Mandatory:$false + It "Should have SecondarySqlCredential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter SecondarySqlCredential -Type System.Management.Automation.PSCredential -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 SeedingMode as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter SeedingMode -Type String -Mandatory:$false + It "Should have SeedingMode as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter SeedingMode -Type System.String -Mandatory:$false } - It "Should have SharedPath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter SharedPath -Type String -Mandatory:$false + It "Should have SharedPath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter SharedPath -Type System.String -Mandatory:$false } It "Should have UseLastBackup as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter UseLastBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter UseLastBackup -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have AdvancedBackupParams as a non-mandatory parameter of type Hashtable" { - $CommandUnderTest | Should -HaveParameter AdvancedBackupParams -Type Hashtable -Mandatory:$false + It "Should have AdvancedBackupParams as a non-mandatory parameter of type System.Collections.Hashtable" { + $CommandUnderTest | Should -HaveParameter AdvancedBackupParams -Type System.Collections.Hashtable -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/Add-DbaAgListener.Tests.ps1 b/tests/Add-DbaAgListener.Tests.ps1 index 6e233678df..cea5f0fc5c 100644 --- a/tests/Add-DbaAgListener.Tests.ps1 +++ b/tests/Add-DbaAgListener.Tests.ps1 @@ -11,41 +11,41 @@ Describe "Add-DbaAgListener" { BeforeAll { $CommandUnderTest = Get-Command Add-DbaAgListener } - 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 AvailabilityGroup as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] -Mandatory:$false + It "Should have AvailabilityGroup as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -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 IPAddress as a non-mandatory parameter of type IPAddress[]" { - $CommandUnderTest | Should -HaveParameter IPAddress -Type IPAddress[] -Mandatory:$false + It "Should have IPAddress as a non-mandatory parameter of type System.Net.IPAddress[]" { + $CommandUnderTest | Should -HaveParameter IPAddress -Type System.Net.IPAddress[] -Mandatory:$false } - It "Should have SubnetIP as a non-mandatory parameter of type IPAddress[]" { - $CommandUnderTest | Should -HaveParameter SubnetIP -Type IPAddress[] -Mandatory:$false + It "Should have SubnetIP as a non-mandatory parameter of type System.Net.IPAddress[]" { + $CommandUnderTest | Should -HaveParameter SubnetIP -Type System.Net.IPAddress[] -Mandatory:$false } - It "Should have SubnetMask as a non-mandatory parameter of type IPAddress[]" { - $CommandUnderTest | Should -HaveParameter SubnetMask -Type IPAddress[] -Mandatory:$false + It "Should have SubnetMask as a non-mandatory parameter of type System.Net.IPAddress[]" { + $CommandUnderTest | Should -HaveParameter SubnetMask -Type System.Net.IPAddress[] -Mandatory:$false } - It "Should have Port as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Port -Type Int32 -Mandatory:$false + It "Should have Port as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Port -Type System.Int32 -Mandatory:$false } It "Should have Dhcp as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Dhcp -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Dhcp -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Passthru as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type AvailabilityGroup[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] -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/Add-DbaAgReplica.Tests.ps1 b/tests/Add-DbaAgReplica.Tests.ps1 index 773891e0c2..b58361844f 100644 --- a/tests/Add-DbaAgReplica.Tests.ps1 +++ b/tests/Add-DbaAgReplica.Tests.ps1 @@ -11,64 +11,64 @@ Describe "Add-DbaAgReplica" { $CommandUnderTest = Get-Command Add-DbaAgReplica } 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 Name parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have ClusterType parameter" { - $CommandUnderTest | Should -HaveParameter ClusterType -Type String + $CommandUnderTest | Should -HaveParameter ClusterType -Type System.String } It "Should have AvailabilityMode parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityMode -Type String + $CommandUnderTest | Should -HaveParameter AvailabilityMode -Type System.String } It "Should have FailoverMode parameter" { - $CommandUnderTest | Should -HaveParameter FailoverMode -Type String + $CommandUnderTest | Should -HaveParameter FailoverMode -Type System.String } It "Should have BackupPriority parameter" { - $CommandUnderTest | Should -HaveParameter BackupPriority -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupPriority -Type System.Int32 } It "Should have ConnectionModeInPrimaryRole parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionModeInPrimaryRole -Type String + $CommandUnderTest | Should -HaveParameter ConnectionModeInPrimaryRole -Type System.String } It "Should have ConnectionModeInSecondaryRole parameter" { - $CommandUnderTest | Should -HaveParameter ConnectionModeInSecondaryRole -Type String + $CommandUnderTest | Should -HaveParameter ConnectionModeInSecondaryRole -Type System.String } It "Should have SeedingMode parameter" { - $CommandUnderTest | Should -HaveParameter SeedingMode -Type String + $CommandUnderTest | Should -HaveParameter SeedingMode -Type System.String } It "Should have Endpoint parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type String + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.String } It "Should have EndpointUrl parameter" { - $CommandUnderTest | Should -HaveParameter EndpointUrl -Type String[] + $CommandUnderTest | Should -HaveParameter EndpointUrl -Type System.String[] } It "Should have Passthru parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter } It "Should have ReadOnlyRoutingList parameter" { - $CommandUnderTest | Should -HaveParameter ReadOnlyRoutingList -Type String[] + $CommandUnderTest | Should -HaveParameter ReadOnlyRoutingList -Type System.String[] } It "Should have ReadonlyRoutingConnectionUrl parameter" { - $CommandUnderTest | Should -HaveParameter ReadonlyRoutingConnectionUrl -Type String + $CommandUnderTest | Should -HaveParameter ReadonlyRoutingConnectionUrl -Type System.String } It "Should have Certificate parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type String + $CommandUnderTest | Should -HaveParameter Certificate -Type System.String } It "Should have ConfigureXESession parameter" { - $CommandUnderTest | Should -HaveParameter ConfigureXESession -Type Switch + $CommandUnderTest | Should -HaveParameter ConfigureXESession -Type System.Management.Automation.SwitchParameter } It "Should have SessionTimeout parameter" { - $CommandUnderTest | Should -HaveParameter SessionTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter SessionTimeout -Type System.Int32 } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Add-DbaComputerCertificate.Tests.ps1 b/tests/Add-DbaComputerCertificate.Tests.ps1 index 25fc5a8c67..f8024e1a48 100644 --- a/tests/Add-DbaComputerCertificate.Tests.ps1 +++ b/tests/Add-DbaComputerCertificate.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Add-DbaComputerCertificate" { $CommandUnderTest = Get-Command Add-DbaComputerCertificate } 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 SecurePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString } It "Should have Certificate as a parameter" { $CommandUnderTest | Should -HaveParameter Certificate -Type System.Security.Cryptography.X509Certificates.X509Certificate2[] } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -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 Flag as a parameter" { - $CommandUnderTest | Should -HaveParameter Flag -Type String[] + $CommandUnderTest | Should -HaveParameter Flag -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/Add-DbaDbMirrorMonitor.Tests.ps1 b/tests/Add-DbaDbMirrorMonitor.Tests.ps1 index 086d1ba438..dbeaa090a1 100644 --- a/tests/Add-DbaDbMirrorMonitor.Tests.ps1 +++ b/tests/Add-DbaDbMirrorMonitor.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Add-DbaDbMirrorMonitor" { $CommandUnderTest = Get-Command Add-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 } 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/Add-DbaExtendedProperty.Tests.ps1 b/tests/Add-DbaExtendedProperty.Tests.ps1 index 8668f27c99..af78697e31 100644 --- a/tests/Add-DbaExtendedProperty.Tests.ps1 +++ b/tests/Add-DbaExtendedProperty.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Add-DbaExtendedProperty" { $CommandUnderTest = Get-Command Add-DbaExtendedProperty } 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 Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Name -Type System.String -Mandatory:$false } It "Should have Value as a parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Value -Type System.String -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject[] -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/Add-DbaPfDataCollectorCounter.Tests.ps1 b/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 index 552666485b..8c6e9847de 100644 --- a/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 +++ b/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 @@ -5,26 +5,26 @@ Describe "Add-DbaPfDataCollectorCounter" { BeforeAll { $CommandUnderTest = Get-Command Add-DbaPfDataCollectorCounter } - It "Should have ComputerName as a non-mandatory DbaInstanceParameter[] parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory Dataplat.Dbatools.Parameter.DbaInstanceParameter[] parameter" { + $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 + It "Should have Credential as a non-mandatory System.Management.Automation.PSCredential parameter" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have CollectorSet as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter CollectorSet -Type String[] -Mandatory:$false + It "Should have CollectorSet as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter CollectorSet -Type System.String[] -Mandatory:$false } - It "Should have Collector as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Collector -Type String[] -Mandatory:$false + It "Should have Collector as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Collector -Type System.String[] -Mandatory:$false } - It "Should have Counter as a non-mandatory Object[] parameter" { - $CommandUnderTest | Should -HaveParameter Counter -Type Object[] -Mandatory:$false + It "Should have Counter as a non-mandatory System.Object[] parameter" { + $CommandUnderTest | Should -HaveParameter Counter -Type System.Object[] -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/Add-DbaRegServer.Tests.ps1 b/tests/Add-DbaRegServer.Tests.ps1 index a0442f2fe8..326a01830e 100644 --- a/tests/Add-DbaRegServer.Tests.ps1 +++ b/tests/Add-DbaRegServer.Tests.ps1 @@ -11,29 +11,29 @@ Describe "Add-DbaRegServer" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -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 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 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 Group as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter Group -Type Object -Mandatory:$false + It "Should have Group as a non-mandatory parameter of type System.Object" { + $CommandUnderTest | Should -HaveParameter Group -Type System.Object -Mandatory:$false } - It "Should have ActiveDirectoryTenant as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ActiveDirectoryTenant -Type String -Mandatory:$false + It "Should have ActiveDirectoryTenant as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ActiveDirectoryTenant -Type System.String -Mandatory:$false } - It "Should have ActiveDirectoryUserId as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ActiveDirectoryUserId -Type String -Mandatory:$false + It "Should have ActiveDirectoryUserId as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ActiveDirectoryUserId -Type System.String -Mandatory:$false } - It "Should have ConnectionString as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ConnectionString -Type String -Mandatory:$false + It "Should have ConnectionString as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ConnectionString -Type System.String -Mandatory:$false } - It "Should have OtherParams as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter OtherParams -Type String -Mandatory:$false + It "Should have OtherParams as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter OtherParams -Type System.String -Mandatory:$false } It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.RegisteredServers.ServerGroup[] -Mandatory:$false @@ -42,7 +42,7 @@ Describe "Add-DbaRegServer" { $CommandUnderTest | Should -HaveParameter ServerObject -Type Microsoft.SqlServer.Management.Smo.Server[] -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/Add-DbaRegServerGroup.Tests.ps1 b/tests/Add-DbaRegServerGroup.Tests.ps1 index 489fa3db52..df23a69b64 100644 --- a/tests/Add-DbaRegServerGroup.Tests.ps1 +++ b/tests/Add-DbaRegServerGroup.Tests.ps1 @@ -17,19 +17,19 @@ Describe "Add-DbaRegServerGroup" { $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 Description as a parameter" { - $CommandUnderTest | Should -HaveParameter Description -Type String + $CommandUnderTest | Should -HaveParameter Description -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.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/Add-DbaReplArticle.Tests.ps1 b/tests/Add-DbaReplArticle.Tests.ps1 index 6c787c7bfb..08aed8481b 100644 --- a/tests/Add-DbaReplArticle.Tests.ps1 +++ b/tests/Add-DbaReplArticle.Tests.ps1 @@ -18,25 +18,25 @@ Describe "Add-DbaReplArticle" { $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 Publication parameter" { - $CommandUnderTest | Should -HaveParameter Publication -Type String + $CommandUnderTest | Should -HaveParameter Publication -Type System.String } It "Should have Schema parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have Name parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Should have Filter parameter" { - $CommandUnderTest | Should -HaveParameter Filter -Type String + $CommandUnderTest | Should -HaveParameter Filter -Type System.String } It "Should have CreationScriptOptions parameter" { $CommandUnderTest | Should -HaveParameter CreationScriptOptions -Type PSObject } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Add-DbaServerRoleMember.Tests.ps1 b/tests/Add-DbaServerRoleMember.Tests.ps1 index 6367ff3fdd..0a71c33f84 100644 --- a/tests/Add-DbaServerRoleMember.Tests.ps1 +++ b/tests/Add-DbaServerRoleMember.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Add-DbaServerRoleMember" { $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 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/Backup-DbaComputerCertificate.Tests.ps1 b/tests/Backup-DbaComputerCertificate.Tests.ps1 index 0f64a8f620..dcfae60e9e 100644 --- a/tests/Backup-DbaComputerCertificate.Tests.ps1 +++ b/tests/Backup-DbaComputerCertificate.Tests.ps1 @@ -13,20 +13,20 @@ Describe "Backup-DbaComputerCertificate" { It "Should have SecurePassword as a non-mandatory SecureString parameter" { $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString -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 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 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 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/Backup-DbaDatabase.Tests.ps1 b/tests/Backup-DbaDatabase.Tests.ps1 index bdacc070f9..63398d595f 100644 --- a/tests/Backup-DbaDatabase.Tests.ps1 +++ b/tests/Backup-DbaDatabase.Tests.ps1 @@ -13,139 +13,139 @@ Describe "Backup-DbaDatabase Unit Tests" -Tag 'UnitTests' { } It "Should have SqlInstance parameter" { - $command | Should -HaveParameter SqlInstance -Type DbaInstanceParameter -Mandatory:$false + $command | Should -HaveParameter SqlInstance -Type Microsoft.SqlServer.Management.Smo.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 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 Path parameter" { - $command | Should -HaveParameter Path -Type String[] -Mandatory:$false + $command | Should -HaveParameter Path -Type System.String[] -Mandatory:$false } It "Should have FilePath parameter" { - $command | Should -HaveParameter FilePath -Type String -Mandatory:$false + $command | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } It "Should have IncrementPrefix parameter" { - $command | Should -HaveParameter IncrementPrefix -Type Switch + $command | Should -HaveParameter IncrementPrefix -Type System.Management.Automation.SwitchParameter } It "Should have ReplaceInName parameter" { - $command | Should -HaveParameter ReplaceInName -Type Switch + $command | Should -HaveParameter ReplaceInName -Type System.Management.Automation.SwitchParameter } It "Should have NoAppendDbNameInPath parameter" { - $command | Should -HaveParameter NoAppendDbNameInPath -Type Switch + $command | Should -HaveParameter NoAppendDbNameInPath -Type System.Management.Automation.SwitchParameter } It "Should have CopyOnly parameter" { - $command | Should -HaveParameter CopyOnly -Type Switch + $command | Should -HaveParameter CopyOnly -Type System.Management.Automation.SwitchParameter } It "Should have Type parameter" { - $command | Should -HaveParameter Type -Type String -Mandatory:$false + $command | Should -HaveParameter Type -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 CreateFolder parameter" { - $command | Should -HaveParameter CreateFolder -Type Switch + $command | Should -HaveParameter CreateFolder -Type System.Management.Automation.SwitchParameter } It "Should have FileCount parameter" { - $command | Should -HaveParameter FileCount -Type Int32 -Mandatory:$false + $command | Should -HaveParameter FileCount -Type System.Int32 -Mandatory:$false } It "Should have CompressBackup parameter" { - $command | Should -HaveParameter CompressBackup -Type Switch + $command | Should -HaveParameter CompressBackup -Type System.Management.Automation.SwitchParameter } It "Should have Checksum parameter" { - $command | Should -HaveParameter Checksum -Type Switch + $command | Should -HaveParameter Checksum -Type System.Management.Automation.SwitchParameter } It "Should have Verify parameter" { - $command | Should -HaveParameter Verify -Type Switch + $command | Should -HaveParameter Verify -Type System.Management.Automation.SwitchParameter } It "Should have MaxTransferSize parameter" { - $command | Should -HaveParameter MaxTransferSize -Type Int32 -Mandatory:$false + $command | Should -HaveParameter MaxTransferSize -Type System.Int32 -Mandatory:$false } It "Should have BlockSize parameter" { - $command | Should -HaveParameter BlockSize -Type Int32 -Mandatory:$false + $command | Should -HaveParameter BlockSize -Type System.Int32 -Mandatory:$false } It "Should have BufferCount parameter" { - $command | Should -HaveParameter BufferCount -Type Int32 -Mandatory:$false + $command | Should -HaveParameter BufferCount -Type System.Int32 -Mandatory:$false } It "Should have AzureBaseUrl parameter" { - $command | Should -HaveParameter AzureBaseUrl -Type String[] -Mandatory:$false + $command | Should -HaveParameter AzureBaseUrl -Type System.String[] -Mandatory:$false } It "Should have AzureCredential parameter" { - $command | Should -HaveParameter AzureCredential -Type String -Mandatory:$false + $command | Should -HaveParameter AzureCredential -Type System.String -Mandatory:$false } It "Should have NoRecovery parameter" { - $command | Should -HaveParameter NoRecovery -Type Switch + $command | Should -HaveParameter NoRecovery -Type System.Management.Automation.SwitchParameter } It "Should have BuildPath parameter" { - $command | Should -HaveParameter BuildPath -Type Switch + $command | Should -HaveParameter BuildPath -Type System.Management.Automation.SwitchParameter } It "Should have WithFormat parameter" { - $command | Should -HaveParameter WithFormat -Type Switch + $command | Should -HaveParameter WithFormat -Type System.Management.Automation.SwitchParameter } It "Should have Initialize parameter" { - $command | Should -HaveParameter Initialize -Type Switch + $command | Should -HaveParameter Initialize -Type System.Management.Automation.SwitchParameter } It "Should have SkipTapeHeader parameter" { - $command | Should -HaveParameter SkipTapeHeader -Type Switch + $command | Should -HaveParameter SkipTapeHeader -Type System.Management.Automation.SwitchParameter } It "Should have TimeStampFormat parameter" { - $command | Should -HaveParameter TimeStampFormat -Type String -Mandatory:$false + $command | Should -HaveParameter TimeStampFormat -Type System.String -Mandatory:$false } It "Should have IgnoreFileChecks parameter" { - $command | Should -HaveParameter IgnoreFileChecks -Type Switch + $command | Should -HaveParameter IgnoreFileChecks -Type System.Management.Automation.SwitchParameter } It "Should have OutputScriptOnly parameter" { - $command | Should -HaveParameter OutputScriptOnly -Type Switch + $command | Should -HaveParameter OutputScriptOnly -Type System.Management.Automation.SwitchParameter } It "Should have EncryptionAlgorithm parameter" { - $command | Should -HaveParameter EncryptionAlgorithm -Type String -Mandatory:$false + $command | Should -HaveParameter EncryptionAlgorithm -Type System.String -Mandatory:$false } It "Should have EncryptionCertificate parameter" { - $command | Should -HaveParameter EncryptionCertificate -Type String -Mandatory:$false + $command | Should -HaveParameter EncryptionCertificate -Type System.String -Mandatory:$false } It "Should have Description parameter" { - $command | Should -HaveParameter Description -Type String -Mandatory:$false + $command | Should -HaveParameter Description -Type System.String -Mandatory:$false } It "Should have EnableException parameter" { - $command | Should -HaveParameter EnableException -Type Switch + $command | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Backup-DbaDbCertificate.Tests.ps1 b/tests/Backup-DbaDbCertificate.Tests.ps1 index b4274decc9..b6c62e341e 100644 --- a/tests/Backup-DbaDbCertificate.Tests.ps1 +++ b/tests/Backup-DbaDbCertificate.Tests.ps1 @@ -6,37 +6,37 @@ Describe "Backup-DbaDbCertificate" { $CommandUnderTest = Get-Command Backup-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 Certificate parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type Object[] + $CommandUnderTest | Should -HaveParameter Certificate -Type System.Object[] } 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 EncryptionPassword parameter" { - $CommandUnderTest | Should -HaveParameter EncryptionPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter EncryptionPassword -Type System.Security.SecureString } It "Should have DecryptionPassword parameter" { - $CommandUnderTest | Should -HaveParameter DecryptionPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter DecryptionPassword -Type System.Security.SecureString } It "Should have Path parameter" { $CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo } It "Should have Suffix parameter" { - $CommandUnderTest | Should -HaveParameter Suffix -Type String + $CommandUnderTest | Should -HaveParameter Suffix -Type System.String } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Certificate[] } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Backup-DbaDbMasterKey.Tests.ps1 b/tests/Backup-DbaDbMasterKey.Tests.ps1 index 527d68d31b..6ce0b012e1 100644 --- a/tests/Backup-DbaDbMasterKey.Tests.ps1 +++ b/tests/Backup-DbaDbMasterKey.Tests.ps1 @@ -5,32 +5,32 @@ Describe "Backup-DbaDbMasterKey" { BeforeAll { $CommandUnderTest = Get-Command Backup-DbaDbMasterKey } - 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 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 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 SecurePassword as a non-mandatory parameter of type SecureString" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString -Mandatory:$false + It "Should have SecurePassword as a non-mandatory parameter of type System.Security.SecureString" { + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString -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 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 } } diff --git a/tests/Backup-DbaServiceMasterKey.Tests.ps1 b/tests/Backup-DbaServiceMasterKey.Tests.ps1 index fdfb5dc760..222a9717be 100644 --- a/tests/Backup-DbaServiceMasterKey.Tests.ps1 +++ b/tests/Backup-DbaServiceMasterKey.Tests.ps1 @@ -9,29 +9,29 @@ Describe "Backup-DbaServiceMasterKey" { BeforeAll { $CommandUnderTest = Get-Command Backup-DbaServiceMasterKey } - 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 KeyCredential as a non-mandatory parameter of type PSCredential" { - $CommandUnderTest | Should -HaveParameter KeyCredential -Type PSCredential -Mandatory:$false + It "Should have KeyCredential as a non-mandatory parameter of type System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter KeyCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have SecurePassword as a non-mandatory parameter of type SecureString" { - $CommandUnderTest | Should -HaveParameter SecurePassword -Type SecureString -Mandatory:$false + It "Should have SecurePassword as a non-mandatory parameter of type System.Security.SecureString" { + $CommandUnderTest | Should -HaveParameter SecurePassword -Type System.Security.SecureString -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 } 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/Clear-DbaConnectionPool.Tests.ps1 b/tests/Clear-DbaConnectionPool.Tests.ps1 index b37640597f..beced6ceb0 100644 --- a/tests/Clear-DbaConnectionPool.Tests.ps1 +++ b/tests/Clear-DbaConnectionPool.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Clear-DbaConnectionPool" { BeforeAll { $CommandUnderTest = Get-Command Clear-DbaConnectionPool } - 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/Clear-DbaLatchStatistics.Tests.ps1 b/tests/Clear-DbaLatchStatistics.Tests.ps1 index 6652299970..ab668c356a 100644 --- a/tests/Clear-DbaLatchStatistics.Tests.ps1 +++ b/tests/Clear-DbaLatchStatistics.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Clear-DbaLatchStatistics" { $CommandUnderTest = Get-Command Clear-DbaLatchStatistics } 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 Microsoft.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/Clear-DbaPlanCache.Tests.ps1 b/tests/Clear-DbaPlanCache.Tests.ps1 index be8569ab00..d26edfbb50 100644 --- a/tests/Clear-DbaPlanCache.Tests.ps1 +++ b/tests/Clear-DbaPlanCache.Tests.ps1 @@ -15,14 +15,14 @@ Describe "Clear-DbaPlanCache" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -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 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/Clear-DbaWaitStatistics.Tests.ps1 b/tests/Clear-DbaWaitStatistics.Tests.ps1 index b5a0fbcfe6..2e1db479af 100644 --- a/tests/Clear-DbaWaitStatistics.Tests.ps1 +++ b/tests/Clear-DbaWaitStatistics.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Clear-DbaWaitStatistics" { $CommandUnderTest = Get-Command Clear-DbaWaitStatistics } 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 } 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/Connect-DbaInstance.Tests.ps1 b/tests/Connect-DbaInstance.Tests.ps1 index dd58ad377a..9463cddf99 100644 --- a/tests/Connect-DbaInstance.Tests.ps1 +++ b/tests/Connect-DbaInstance.Tests.ps1 @@ -16,94 +16,94 @@ Describe "Connect-DbaInstance" { $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 ApplicationIntent as a parameter" { - $CommandUnderTest | Should -HaveParameter ApplicationIntent -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ApplicationIntent -Type System.String -Mandatory:$false } It "Should have AzureUnsupported as a parameter" { - $CommandUnderTest | Should -HaveParameter AzureUnsupported -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AzureUnsupported -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have BatchSeparator as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String -Mandatory:$false } It "Should have ClientName as a parameter" { - $CommandUnderTest | Should -HaveParameter ClientName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ClientName -Type System.String -Mandatory:$false } It "Should have ConnectTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter ConnectTimeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ConnectTimeout -Type System.Int32 -Mandatory:$false } It "Should have EncryptConnection as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter FailoverPartner -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FailoverPartner -Type System.String -Mandatory:$false } It "Should have LockTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter LockTimeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LockTimeout -Type System.Int32 -Mandatory:$false } It "Should have MaxPoolSize as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxPoolSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxPoolSize -Type System.Int32 -Mandatory:$false } It "Should have MinPoolSize as a parameter" { - $CommandUnderTest | Should -HaveParameter MinPoolSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinPoolSize -Type System.Int32 -Mandatory:$false } It "Should have MinimumVersion as a parameter" { - $CommandUnderTest | Should -HaveParameter MinimumVersion -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinimumVersion -Type System.Int32 -Mandatory:$false } It "Should have MultipleActiveResultSets as a 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 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 parameter" { - $CommandUnderTest | Should -HaveParameter NetworkProtocol -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NetworkProtocol -Type System.String -Mandatory:$false } It "Should have NonPooledConnection as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter PacketSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PacketSize -Type System.Int32 -Mandatory:$false } It "Should have PooledConnectionLifetime as a parameter" { - $CommandUnderTest | Should -HaveParameter PooledConnectionLifetime -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PooledConnectionLifetime -Type System.Int32 -Mandatory:$false } It "Should have SqlExecutionModes as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlExecutionModes -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlExecutionModes -Type System.String -Mandatory:$false } It "Should have StatementTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter StatementTimeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StatementTimeout -Type System.Int32 -Mandatory:$false } It "Should have TrustServerCertificate as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter WorkstationId -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter WorkstationId -Type System.String -Mandatory:$false } It "Should have AlwaysEncrypted as a parameter" { - $CommandUnderTest | Should -HaveParameter AlwaysEncrypted -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AlwaysEncrypted -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have AppendConnectionString as a parameter" { - $CommandUnderTest | Should -HaveParameter AppendConnectionString -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AppendConnectionString -Type System.String -Mandatory:$false } It "Should have SqlConnectionOnly as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlConnectionOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlConnectionOnly -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have AzureDomain as a parameter" { - $CommandUnderTest | Should -HaveParameter AzureDomain -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AzureDomain -Type System.String -Mandatory:$false } It "Should have Tenant as a parameter" { - $CommandUnderTest | Should -HaveParameter Tenant -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Tenant -Type System.String -Mandatory:$false } It "Should have AccessToken as a parameter" { $CommandUnderTest | Should -HaveParameter AccessToken -Type PSObject -Mandatory:$false } It "Should have DedicatedAdminConnection as a parameter" { - $CommandUnderTest | Should -HaveParameter DedicatedAdminConnection -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DedicatedAdminConnection -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DisableException as a parameter" { - $CommandUnderTest | Should -HaveParameter DisableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DisableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Convert-DbaLsn.Tests.ps1 b/tests/Convert-DbaLsn.Tests.ps1 index 374a13784e..a2a021b897 100644 --- a/tests/Convert-DbaLsn.Tests.ps1 +++ b/tests/Convert-DbaLsn.Tests.ps1 @@ -12,10 +12,10 @@ Describe "Convert-DbaLSN" { $CommandUnderTest = Get-Command Convert-DbaLSN } It "Should have LSN as a parameter" { - $CommandUnderTest | Should -HaveParameter LSN -Type String + $CommandUnderTest | Should -HaveParameter LSN -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/Convert-DbaMaskingValue.Tests.ps1 b/tests/Convert-DbaMaskingValue.Tests.ps1 index a60fb53610..33f872b2b6 100644 --- a/tests/Convert-DbaMaskingValue.Tests.ps1 +++ b/tests/Convert-DbaMaskingValue.Tests.ps1 @@ -11,16 +11,16 @@ Describe "Convert-DbaMaskingValue" { $CommandUnderTest = Get-Command Convert-DbaMaskingValue } It "Should have Value as a parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type Object[] + $CommandUnderTest | Should -HaveParameter Value -Type System.Object[] } It "Should have DataType as a parameter" { - $CommandUnderTest | Should -HaveParameter DataType -Type String + $CommandUnderTest | Should -HaveParameter DataType -Type System.String } It "Should have Nullable as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Nullable -Type Switch + $CommandUnderTest | Should -HaveParameter Nullable -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/ConvertTo-DbaDataTable.Tests.ps1 b/tests/ConvertTo-DbaDataTable.Tests.ps1 index 0e76a4a37b..5b92fb2cc4 100644 --- a/tests/ConvertTo-DbaDataTable.Tests.ps1 +++ b/tests/ConvertTo-DbaDataTable.Tests.ps1 @@ -10,22 +10,22 @@ Describe "ConvertTo-DbaDataTable" { $CommandUnderTest = Get-Command ConvertTo-DbaDataTable } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] -Mandatory:$false } It "Should have TimeSpanType as a parameter" { - $CommandUnderTest | Should -HaveParameter TimeSpanType -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter TimeSpanType -Type System.String -Mandatory:$false } It "Should have SizeType as a parameter" { - $CommandUnderTest | Should -HaveParameter SizeType -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SizeType -Type System.String -Mandatory:$false } It "Should have IgnoreNull as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreNull -Type Switch + $CommandUnderTest | Should -HaveParameter IgnoreNull -Type System.Management.Automation.SwitchParameter } It "Should have Raw as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch + $CommandUnderTest | Should -HaveParameter Raw -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 } } @@ -143,7 +143,7 @@ Describe "ConvertTo-DbaDataTable" { } It "Should return '1.00:00:00' when TimeSpanType is String" { - (ConvertTo-DbaDataTable -InputObject $obj -TimeSpanType String).Timespan | Should -Be '1.00:00:00' + (ConvertTo-DbaDataTable -InputObject $obj -TimeSpanType System.String).Timespan | Should -Be '1.00:00:00' } It "Should return 864000000000 when TimeSpanType is Ticks" { diff --git a/tests/ConvertTo-DbaTimeline.Tests.ps1 b/tests/ConvertTo-DbaTimeline.Tests.ps1 index d6013692fd..11635d235c 100644 --- a/tests/ConvertTo-DbaTimeline.Tests.ps1 +++ b/tests/ConvertTo-DbaTimeline.Tests.ps1 @@ -12,13 +12,13 @@ Describe "ConvertTo-DbaTimeline" { $CommandUnderTest = Get-Command ConvertTo-DbaTimeline } 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 ExcludeRowLabel as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeRowLabel -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeRowLabel -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/ConvertTo-DbaXESession.Tests.ps1 b/tests/ConvertTo-DbaXESession.Tests.ps1 index 9cd8ecb02b..4cfefc573b 100644 --- a/tests/ConvertTo-DbaXESession.Tests.ps1 +++ b/tests/ConvertTo-DbaXESession.Tests.ps1 @@ -6,16 +6,16 @@ Describe "ConvertTo-DbaXESession" { $CommandUnderTest = Get-Command ConvertTo-DbaXESession } It "Accepts InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Accepts Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } It "Accepts OutputScriptOnly as a parameter" { - $CommandUnderTest | Should -HaveParameter OutputScriptOnly -Type Switch + $CommandUnderTest | Should -HaveParameter OutputScriptOnly -Type System.Management.Automation.SwitchParameter } 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/Copy-DbaAgentJob.Tests.ps1 b/tests/Copy-DbaAgentJob.Tests.ps1 index a487157413..5cdace2fb7 100644 --- a/tests/Copy-DbaAgentJob.Tests.ps1 +++ b/tests/Copy-DbaAgentJob.Tests.ps1 @@ -12,37 +12,37 @@ Describe "Copy-DbaAgentJob" { $CommandUnderTest = Get-Command Copy-DbaAgentJob } 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 Microsoft.SqlServer.Management.Smo.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 Microsoft.SqlServer.Management.Smo.PSCredential } It "Should have Job as a parameter" { - $CommandUnderTest | Should -HaveParameter Job -Type Object[] + $CommandUnderTest | Should -HaveParameter Job -Type System.Object[] } It "Should have ExcludeJob as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeJob -Type System.Object[] } It "Should have DisableOnSource as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DisableOnSource -Type Switch + $CommandUnderTest | Should -HaveParameter DisableOnSource -Type System.Management.Automation.SwitchParameter } It "Should have DisableOnDestination as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DisableOnDestination -Type Switch + $CommandUnderTest | Should -HaveParameter DisableOnDestination -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 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/Copy-DbaAgentJobCategory.Tests.ps1 b/tests/Copy-DbaAgentJobCategory.Tests.ps1 index 6d53e5208d..46aa9facbc 100644 --- a/tests/Copy-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Copy-DbaAgentJobCategory.Tests.ps1 @@ -6,34 +6,34 @@ Describe "Copy-DbaAgentJobCategory" { $CommandUnderTest = Get-Command Copy-DbaAgentJobCategory } 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 CategoryType parameter" { - $CommandUnderTest | Should -HaveParameter CategoryType -Type String[] + $CommandUnderTest | Should -HaveParameter CategoryType -Type System.String[] } It "Should have JobCategory parameter" { - $CommandUnderTest | Should -HaveParameter JobCategory -Type String[] + $CommandUnderTest | Should -HaveParameter JobCategory -Type System.String[] } It "Should have AgentCategory parameter" { - $CommandUnderTest | Should -HaveParameter AgentCategory -Type String[] + $CommandUnderTest | Should -HaveParameter AgentCategory -Type System.String[] } It "Should have OperatorCategory parameter" { - $CommandUnderTest | Should -HaveParameter OperatorCategory -Type String[] + $CommandUnderTest | Should -HaveParameter OperatorCategory -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/Copy-DbaAgentProxy.Tests.ps1 b/tests/Copy-DbaAgentProxy.Tests.ps1 index 248f5ac0f6..7a1c4e8955 100644 --- a/tests/Copy-DbaAgentProxy.Tests.ps1 +++ b/tests/Copy-DbaAgentProxy.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Copy-DbaAgentProxy" { $CommandUnderTest = Get-Command Copy-DbaAgentProxy } 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 ProxyAccount as a parameter" { - $CommandUnderTest | Should -HaveParameter ProxyAccount -Type String[] + $CommandUnderTest | Should -HaveParameter ProxyAccount -Type System.String[] } It "Should have ExcludeProxyAccount as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeProxyAccount -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeProxyAccount -Type System.String[] } 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/Copy-DbaAgentSchedule.Tests.ps1 b/tests/Copy-DbaAgentSchedule.Tests.ps1 index 4fed6f2cc4..fdba6ba25d 100644 --- a/tests/Copy-DbaAgentSchedule.Tests.ps1 +++ b/tests/Copy-DbaAgentSchedule.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Copy-DbaAgentSchedule" { $CommandUnderTest = Get-Command Copy-DbaAgentSchedule } 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 Schedule as a parameter" { - $CommandUnderTest | Should -HaveParameter Schedule -Type String[] + $CommandUnderTest | Should -HaveParameter Schedule -Type System.String[] } 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 Microsoft.SqlServer.Management.Smo.Agent.JobSchedule[] } 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/Copy-DbaAgentServer.Tests.ps1 b/tests/Copy-DbaAgentServer.Tests.ps1 index b37817472b..fc62aee260 100644 --- a/tests/Copy-DbaAgentServer.Tests.ps1 +++ b/tests/Copy-DbaAgentServer.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Copy-DbaAgentServer" { $CommandUnderTest = Get-Command Copy-DbaAgentServer } 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 DisableJobsOnDestination as a switch parameter" { $CommandUnderTest | Should -HaveParameter DisableJobsOnDestination -Type switch diff --git a/tests/Copy-DbaBackupDevice.Tests.ps1 b/tests/Copy-DbaBackupDevice.Tests.ps1 index 2951633aa8..59a560aa56 100644 --- a/tests/Copy-DbaBackupDevice.Tests.ps1 +++ b/tests/Copy-DbaBackupDevice.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Copy-DbaBackupDevice" { $CommandUnderTest = Get-Command Copy-DbaBackupDevice } 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 BackupDevice as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupDevice -Type Object[] + $CommandUnderTest | Should -HaveParameter BackupDevice -Type System.Object[] } It "Should have Force as a parameter" { $CommandUnderTest | Should -HaveParameter Force -Type Switch diff --git a/tests/Copy-DbaCredential.Tests.ps1 b/tests/Copy-DbaCredential.Tests.ps1 index 9a14d702f3..c381c50516 100644 --- a/tests/Copy-DbaCredential.Tests.ps1 +++ b/tests/Copy-DbaCredential.Tests.ps1 @@ -42,37 +42,37 @@ Describe "Copy-DbaCredential" { $CommandUnderTest = Get-Command Copy-DbaCredential } 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 Credential parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential + $CommandUnderTest | Should -HaveParameter Credential -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 Name parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have ExcludeName parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeName -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeName -Type System.String[] } It "Should have Identity parameter" { - $CommandUnderTest | Should -HaveParameter Identity -Type String[] + $CommandUnderTest | Should -HaveParameter Identity -Type System.String[] } It "Should have ExcludeIdentity parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeIdentity -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeIdentity -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/Copy-DbaCustomError.Tests.ps1 b/tests/Copy-DbaCustomError.Tests.ps1 index cd3fb0030c..ce3715fb62 100644 --- a/tests/Copy-DbaCustomError.Tests.ps1 +++ b/tests/Copy-DbaCustomError.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Copy-DbaCustomError" { $CommandUnderTest = Get-Command Copy-DbaCustomError } 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 CustomError as a parameter" { - $CommandUnderTest | Should -HaveParameter CustomError -Type Object[] + $CommandUnderTest | Should -HaveParameter CustomError -Type System.Object[] } It "Should have ExcludeCustomError as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeCustomError -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeCustomError -Type System.Object[] } It "Should have Force as a parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.Switch } 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/Copy-DbaDataCollector.Tests.ps1 b/tests/Copy-DbaDataCollector.Tests.ps1 index 2ba1ad19b6..1d63466fed 100644 --- a/tests/Copy-DbaDataCollector.Tests.ps1 +++ b/tests/Copy-DbaDataCollector.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Copy-DbaDataCollector" { $CommandUnderTest = Get-Command Copy-DbaDataCollector } 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 CollectionSet parameter" { - $CommandUnderTest | Should -HaveParameter CollectionSet -Type Object[] + $CommandUnderTest | Should -HaveParameter CollectionSet -Type System.Object[] } It "Should have ExcludeCollectionSet parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeCollectionSet -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeCollectionSet -Type System.Object[] } It "Should have NoServerReconfig parameter" { - $CommandUnderTest | Should -HaveParameter NoServerReconfig -Type Switch + $CommandUnderTest | Should -HaveParameter NoServerReconfig -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/Copy-DbaDatabase.Tests.ps1 b/tests/Copy-DbaDatabase.Tests.ps1 index 992528daa2..bdd0cdd0a7 100644 --- a/tests/Copy-DbaDatabase.Tests.ps1 +++ b/tests/Copy-DbaDatabase.Tests.ps1 @@ -71,23 +71,23 @@ Describe "Copy-DbaDatabase" { $params | Should -Contain 'KeepReplication' } - It "Source should be a DbaInstanceParameter and not mandatory" { - (Get-Command Copy-DbaDatabase).Parameters['Source'].ParameterType.Name | Should -Be 'DbaInstanceParameter' + It "Source should be a Dataplat.Dbatools.Parameter.DbaInstanceParameter and not mandatory" { + (Get-Command Copy-DbaDatabase).Parameters['Source'].ParameterType.FullName | Should -Be 'Dataplat.Dbatools.Parameter.DbaInstanceParameter' (Get-Command Copy-DbaDatabase).Parameters['Source'].Attributes.Mandatory | Should -Be $false } - It "SourceSqlCredential should be a PSCredential and not mandatory" { - (Get-Command Copy-DbaDatabase).Parameters['SourceSqlCredential'].ParameterType.Name | Should -Be 'PSCredential' + It "SourceSqlCredential should be a System.Management.Automation.PSCredential and not mandatory" { + (Get-Command Copy-DbaDatabase).Parameters['SourceSqlCredential'].ParameterType.FullName | Should -Be 'System.Management.Automation.PSCredential' (Get-Command Copy-DbaDatabase).Parameters['SourceSqlCredential'].Attributes.Mandatory | Should -Be $false } - It "Destination should be a DbaInstanceParameter[] and not mandatory" { - (Get-Command Copy-DbaDatabase).Parameters['Destination'].ParameterType.Name | Should -Be 'DbaInstanceParameter[]' + It "Destination should be a Dataplat.Dbatools.Parameter.DbaInstanceParameter[] and not mandatory" { + (Get-Command Copy-DbaDatabase).Parameters['Destination'].ParameterType.FullName | Should -Be 'Dataplat.Dbatools.Parameter.DbaInstanceParameter[]' (Get-Command Copy-DbaDatabase).Parameters['Destination'].Attributes.Mandatory | Should -Be $false } - It "DestinationSqlCredential should be a PSCredential and not mandatory" { - (Get-Command Copy-DbaDatabase).Parameters['DestinationSqlCredential'].ParameterType.Name | Should -Be 'PSCredential' + It "DestinationSqlCredential should be a System.Management.Automation.PSCredential and not mandatory" { + (Get-Command Copy-DbaDatabase).Parameters['DestinationSqlCredential'].ParameterType.FullName | Should -Be 'System.Management.Automation.PSCredential' (Get-Command Copy-DbaDatabase).Parameters['DestinationSqlCredential'].Attributes.Mandatory | Should -Be $false } diff --git a/tests/Copy-DbaDbAssembly.Tests.ps1 b/tests/Copy-DbaDbAssembly.Tests.ps1 index e618eb8057..83efd527fb 100644 --- a/tests/Copy-DbaDbAssembly.Tests.ps1 +++ b/tests/Copy-DbaDbAssembly.Tests.ps1 @@ -7,28 +7,28 @@ Describe "Copy-DbaDbAssembly Unit Tests" -Tag 'UnitTests' { $Command = Get-Command -Name $CommandName } It "Should have Source parameter" { - $Command | Should -HaveParameter Source -Type DbaInstanceParameter -Mandatory:$false + $Command | Should -HaveParameter Source -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false } It "Should have SourceSqlCredential parameter" { - $Command | Should -HaveParameter SourceSqlCredential -Type PSCredential -Mandatory:$false + $Command | Should -HaveParameter SourceSqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Destination parameter" { - $Command | Should -HaveParameter Destination -Type DbaInstanceParameter[] -Mandatory:$false + $Command | Should -HaveParameter Destination -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have DestinationSqlCredential parameter" { - $Command | Should -HaveParameter DestinationSqlCredential -Type PSCredential -Mandatory:$false + $Command | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Assembly parameter" { - $Command | Should -HaveParameter Assembly -Type Object[] -Mandatory:$false + $Command | Should -HaveParameter Assembly -Type System.Object[] -Mandatory:$false } It "Should have ExcludeAssembly parameter" { - $Command | Should -HaveParameter ExcludeAssembly -Type Object[] -Mandatory:$false + $Command | Should -HaveParameter ExcludeAssembly -Type System.Object[] -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 } } } @@ -46,59 +46,4 @@ Describe "Copy-DbaDbAssembly Integration Tests" -Tag "IntegrationTests" { $server2.Query("RECONFIGURE") $instance2DB = Get-DbaDatabase -SqlInstance $global:instance2 -Database dbclrassembly - $instance2DB.Query("CREATE ASSEMBLY [resolveDNS] AUTHORIZATION [dbo] FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C010300457830570000000000000000E00002210B010B000008000000060000000000002E260000002000000040000000000010002000000002000004000000000000000400000000000000008000000002000000000000030040850000100000100000000010000010000000000000100000000000000000000000E02500004B00000000400000B002000000000000000000000000000000000000006000000C000000A82400001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E7465787400000034060000002000000008000000020000000000000000000000000000200000602E72737263000000B00200000040000000040000000A0000000000000000000000000000400000402E72656C6F6300000C0000000060000000020000000E0000000000000000000000000000400000420000000000000000000000000000000010260000000000004800000002000500A42000000404000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001B3001002F000000010000110000026F0500000A280600000A6F0700000A6F0800000A0A06730900000A0BDE0B260002730900000A0BDE0000072A0001100000000001002021000B010000011E02280A00000A2A42534A4201000100000000000C00000076322E302E35303732370000000005006C00000070010000237E0000DC010000A401000023537472696E67730000000080030000080000002355530088030000100000002347554944000000980300006C00000023426C6F620000000000000002000001471502000900000000FA253300160000010000000A0000000200000002000000010000000A0000000400000001000000010000000300000000000A0001000000000006003E0037000A006600510006009D008A000F00B10000000600E000C00006000001C0000A00440129010600590137000E00700165010E007401650100000000010000000000010001000100100019000000050001000100502000000000960070000A0001009C200000000086187D001000020000000100830019007D00140029007D001A0031007D00100039007D00100041006001240049008001280051008D01240009009A01240011007D002E0009007D001000200023001F002E000B0039002E00130042002E001B004B0033000480000000000000000000000000000000001E01000002000000000000000000000001002E00000000000200000000000000000000000100450000000000020000000000000000000000010037000000000000000000003C4D6F64756C653E007265736F6C7665444E532E646C6C0055736572446566696E656446756E6374696F6E73006D73636F726C69620053797374656D004F626A6563740053797374656D2E446174610053797374656D2E446174612E53716C54797065730053716C537472696E67004950746F486F73744E616D65002E63746F72006970616464720053797374656D2E446961676E6F73746963730044656275676761626C6541747472696275746500446562756767696E674D6F6465730053797374656D2E52756E74696D652E436F6D70696C6572536572766963657300436F6D70696C6174696F6E52656C61786174696F6E734174747269627574650052756E74696D65436F6D7061746962696C697479417474726962757465007265736F6C7665444E53004D6963726F736F66742E53716C5365727665722E5365727665720053716C46756E6374696F6E41747472696275746500537472696E67005472696D0053797374656D2E4E657400446E73004950486F7374456E74727900476574486F7374456E747279006765745F486F73744E616D6500546F537472696E6700000003200000000000BBBB2D2F51E12E4791398BFA79459ABA0008B77A5C561934E08905000111090E03200001052001011111042001010804010000000320000E05000112290E042001010E0507020E11090801000701000000000801000800000000001E01000100540216577261704E6F6E457863657074696F6E5468726F7773010000000000004578305700000000020000001C010000C4240000C40600005253445357549849C5462E43AD588F97CA53634201000000633A5C74656D705C4461746162617365315C4461746162617365315C6F626A5C44656275675C7265736F6C7665444E532E706462000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000826000000000000000000001E260000002000000000000000000000000000000000000000000000102600000000000000005F436F72446C6C4D61696E006D73636F7265652E646C6C0000000000FF25002000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100100000001800008000000000000000000000000000000100010000003000008000000000000000000000000000000100000000004800000058400000540200000000000000000000540234000000560053005F00560045005200530049004F004E005F0049004E0046004F0000000000BD04EFFE00000100000000000000000000000000000000003F000000000000000400000002000000000000000000000000000000440000000100560061007200460069006C00650049006E0066006F00000000002400040000005400720061006E0073006C006100740069006F006E00000000000000B004B4010000010053007400720069006E006700460069006C00650049006E0066006F0000009001000001003000300030003000300034006200300000002C0002000100460069006C0065004400650073006300720069007000740069006F006E000000000020000000300008000100460069006C006500560065007200730069006F006E000000000030002E0030002E0030002E003000000040000F00010049006E007400650072006E0061006C004E0061006D00650000007200650073006F006C007600650044004E0053002E0064006C006C00000000002800020001004C006500670061006C0043006F00700079007200690067006800740000002000000048000F0001004F0072006900670069006E0061006C00460069006C0065006E0061006D00650000007200650073006F006C007600650044004E0053002E0064006C006C0000000000340008000100500072006F006400750063007400560065007200730069006F006E00000030002E0030002E0030002E003000000038000800010041007300730065006D0062006C0079002000560065007200730069006F006E00000030002E0030002E0030002E003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000C000000303600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") - - $hash = $instance2DB.Query("SELECT HASHBYTES('SHA2_512', content) AS SHA2_512 FROM sys.assembly_files WHERE name = 'resolveDNS'") - $hexStr = "0x$(($hash.SHA2_512 | ForEach-Object ToString X2) -join '')" - $server3.Query(" - DECLARE - @hash VARBINARY(64) = $hexStr - , @assemblyName NVARCHAR(4000) = 'resolveDNS'; - - EXEC sys.sp_add_trusted_assembly - @hash = @hash - , @description = @assemblyName") - } - - AfterAll { - Get-DbaDatabase -SqlInstance $global:instance2, $global:instance3 -Database dbclrassembly | Remove-DbaDatabase -Confirm:$false - $server3.Query(" - DECLARE - @hash VARBINARY(64) = $hexStr - , @assemblyName NVARCHAR(4000) = 'resolveDNS'; - - IF EXISTS (SELECT 1 FROM sys.trusted_assemblies WHERE description = @assemblyName) - BEGIN - EXEC sys.sp_drop_trusted_assembly @hash = @hash; - END") - } - - Context "Copying database assemblies" { - It "copies the sample database assembly" { - $results = Copy-DbaDbAssembly -Source $global:instance2 -Destination $global:instance3 -Assembly dbclrassembly.resolveDNS - $results.Name | Should -Be resolveDns - $results.Status | Should -Be Successful - $results.Type | Should -Be "Database Assembly" - $results.SourceDatabaseID | Should -Be (Get-DbaDatabase -SqlInstance $global:instance2 -Database dbclrassembly).ID - $results.DestinationDatabaseID | Should -Be (Get-DbaDatabase -SqlInstance $global:instance3 -Database dbclrassembly).ID - } - - It "excludes an assembly" { - $results = Copy-DbaDbAssembly -Source $global:instance2 -Destination $global:instance3 -Assembly dbclrassembly.resolveDNS -ExcludeAssembly dbclrassembly.resolveDNS - $results | Should -BeNullOrEmpty - } - - It "forces a drop/create of the assembly in the target server" { - $results = Copy-DbaDbAssembly -Source $global:instance2 -Destination $global:instance3 -Assembly dbclrassembly.resolveDNS - $results.Status | Should -Be Skipped - $results.Notes | Should -Be "Already exists on destination" - - $results = Copy-DbaDbAssembly -Source $global:instance2 -Destination $global:instance3 -Assembly dbclrassembly.resolveDNS -Force - $results.Name | Should -Be resolveDns - $results.Status | Should -Be Successful - $results.Type | Should -Be "Database Assembly" - $results.SourceDatabaseID | Should -Be (Get-DbaDatabase -SqlInstance $global:instance2 -Database dbclrassembly).ID - $results.DestinationDatabaseID | Should -Be (Get-DbaDatabase -SqlInstance $global:instance3 -Database dbclrassembly).ID - } - } -} + $instance2DB.Query("CREATE ASSEMBLY [resolveDNS] AUTHORIZATION [dbo] FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C010300457830570000000000000000E00002210B010B000008000000060000000000002E260000002000000040000000000010002000000002000004000000000000000400000000000000008000000002000000000000030040850000100000100000000010000010000000000000100000000000000000000000E02500004B00000000400000B002000000000000000000000000000000000000006000000C000000A82400001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E7465787400000034060000002000000008000000020000000000000000000000000000200000602E72737263000000B00200000040000000040000000A0000000000000000000000000000400000402E72656C6F6300000C0000000060000000020000000E0000000000000000000000000000400000420000000000000000000000000000000010260000000000004800000002000500A42000000404000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001B3001002F000000010000110000026F0500000A280600000A6F0700000A6F0800000A0A06730900000A0BDE0B260002730900000A0BDE0000072A0001100000000001002021000B010000011E02280A00000A2A42534A4201000100000000000C00000076322E302E35303732370000000005006C00000070010000237E0000DC010000A401000023537472696E67730000000080030000080000002355530088030000100000002347554944000000980300006C00000023426C6F620000000000000002000001471502000900000000FA253300160000010000000A0000000200000002000000010000000A0000000400000001000000010000000300000000000A0001000000000006003E0037000A006600510006009D008A000F00B10000000600E000C00006000001C0000A00440129010600590137000E00700165010E007401650100000000010000000000010001000100100019000000050001000100502000000000960070000A0001009C200000000086187D001000020000000100830019007D00140029007D001A0031007D00100039007D00100041006001240049008001280051008D01240009009A01240011007D002E0009007D001000200023001F002E000B0039002E00130042002E001B004B0033000480000000000000000000000000000000001E01000002000000000000000000000001002E00000000000200000000000000000000000000100450000000000020000000000000000000000010037000000000000000000003C4D6F64756C653E007265736F6C7665444E532E646C6C0055736572446566696E656446756E6374696F6E73006D73636F726C69620053797374656D004F626A6563740053797374656D2E446174610053797374656D2E446174612E53716C54797065730053716C537472696E67004950746F486F73744E616D65002E63746F72006970616464720053797374656D2E446961676E6F73746963730044656275676761626C6541747472696275746500446562756767696E674D6F6465730053797374656D2E52756E74696D652E436F6D70696C6572536572766963657300436F6D70696C6174696F6E52656C61786174696F6E734174747269627574650052756E74696D65436F6D7061746962696C697479417474726962757465007265736F6C7665444E53004D6963726F736F66742E53716C5365727665722E5365727665720053716C46756E6374696F6E41747472696275746500537472696E67005472696D0053797374656D2E4E657400446E73004950486F7374456E74727900476574486F7374456E747279006765745F486F73744E616D6500546F537472696E6700000003200000000000BBBB2D2F51E12E4791398BFA79459ABA0008B77A5C561934E08905000111090E03200001052001011111042001010804010000000320000E05000112290E042001010E0507020E11090801000701000000000801000800000000001E01000100540216577261704E6F6E457863657074696F6E5468726F7773010000000000004578305700000000020000001C010000C4240000C40600005253445357549849C5462E43AD588F97CA53634201000000633A5C74656D705C4461746162617365315C4461746162617365315C6F626A5C44656275675C7265736F6C7665444E532E706462000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file diff --git a/tests/Copy-DbaDbCertificate.Tests.ps1 b/tests/Copy-DbaDbCertificate.Tests.ps1 index 042e4896f3..ccfb2e2fca 100644 --- a/tests/Copy-DbaDbCertificate.Tests.ps1 +++ b/tests/Copy-DbaDbCertificate.Tests.ps1 @@ -6,43 +6,43 @@ Describe "Copy-DbaDbCertificate" { $CommandUnderTest = Get-Command Copy-DbaDbCertificate } 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 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 Certificate as a parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type String[] + $CommandUnderTest | Should -HaveParameter Certificate -Type System.String[] } It "Should have ExcludeCertificate as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeCertificate -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeCertificate -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 MasterKeyPassword as a parameter" { - $CommandUnderTest | Should -HaveParameter MasterKeyPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter MasterKeyPassword -Type System.Security.SecureString } It "Should have EncryptionPassword as a parameter" { - $CommandUnderTest | Should -HaveParameter EncryptionPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter EncryptionPassword -Type System.Security.SecureString } It "Should have DecryptionPassword as a parameter" { - $CommandUnderTest | Should -HaveParameter DecryptionPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter DecryptionPassword -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/Copy-DbaDbMail.Tests.ps1 b/tests/Copy-DbaDbMail.Tests.ps1 index 720e45153a..25198217f5 100644 --- a/tests/Copy-DbaDbMail.Tests.ps1 +++ b/tests/Copy-DbaDbMail.Tests.ps1 @@ -61,25 +61,25 @@ Describe "Copy-DbaDbMail" { $CommandUnderTest = Get-Command Copy-DbaDbMail } 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 Destination as a parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Destination -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type String[] + $CommandUnderTest | Should -HaveParameter Type -Type System.String[] } 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 DestinationSqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } 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/Copy-DbaDbQueryStoreOption.Tests.ps1 b/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 index 61b6d01d10..e897148a39 100644 --- a/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 +++ b/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Copy-DbaDbQueryStoreOption" { $CommandUnderTest = Get-Command Copy-DbaDbQueryStoreOption } 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 SourceDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter SourceDatabase -Type Object + $CommandUnderTest | Should -HaveParameter SourceDatabase -Type System.Object } 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 DestinationDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type System.Object[] } It "Should have Exclude as a parameter" { - $CommandUnderTest | Should -HaveParameter Exclude -Type Object[] + $CommandUnderTest | Should -HaveParameter Exclude -Type System.Object[] } It "Should have AllDatabases as a parameter" { - $CommandUnderTest | Should -HaveParameter AllDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter AllDatabases -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/Copy-DbaDbTableData.Tests.ps1 b/tests/Copy-DbaDbTableData.Tests.ps1 index 99c5e5f03e..baca8278d1 100644 --- a/tests/Copy-DbaDbTableData.Tests.ps1 +++ b/tests/Copy-DbaDbTableData.Tests.ps1 @@ -46,76 +46,76 @@ Describe "Copy-DbaDbTableData" { $CommandUnderTest = Get-Command Copy-DbaDbTableData } 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.Management.Automation.PSCredential } It "Should have Destination as a parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Destination -Type Dataplat.Dbatools.Connection.ManagementConnectionType[] } It "Should have DestinationSqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type Microsoft.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 DestinationDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type String + $CommandUnderTest | Should -HaveParameter DestinationDatabase -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 View as a parameter" { - $CommandUnderTest | Should -HaveParameter View -Type String[] + $CommandUnderTest | Should -HaveParameter View -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 AutoCreateTable as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type Switch + $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type System.Management.Automation.SwitchParameter } It "Should have BatchSize as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 } It "Should have NotifyAfter as a parameter" { - $CommandUnderTest | Should -HaveParameter NotifyAfter -Type Int32 + $CommandUnderTest | Should -HaveParameter NotifyAfter -Type System.Int32 } It "Should have DestinationTable as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationTable -Type String + $CommandUnderTest | Should -HaveParameter DestinationTable -Type System.String } It "Should have NoTableLock as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoTableLock -Type Switch + $CommandUnderTest | Should -HaveParameter NoTableLock -Type System.Management.Automation.SwitchParameter } It "Should have CheckConstraints as a switch parameter" { - $CommandUnderTest | Should -HaveParameter CheckConstraints -Type Switch + $CommandUnderTest | Should -HaveParameter CheckConstraints -Type System.Management.Automation.SwitchParameter } It "Should have FireTriggers as a switch parameter" { - $CommandUnderTest | Should -HaveParameter FireTriggers -Type Switch + $CommandUnderTest | Should -HaveParameter FireTriggers -Type System.Management.Automation.SwitchParameter } It "Should have KeepIdentity as a switch parameter" { - $CommandUnderTest | Should -HaveParameter KeepIdentity -Type Switch + $CommandUnderTest | Should -HaveParameter KeepIdentity -Type System.Management.Automation.SwitchParameter } It "Should have KeepNulls as a switch parameter" { - $CommandUnderTest | Should -HaveParameter KeepNulls -Type Switch + $CommandUnderTest | Should -HaveParameter KeepNulls -Type System.Management.Automation.SwitchParameter } It "Should have Truncate as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Truncate -Type Switch + $CommandUnderTest | Should -HaveParameter Truncate -Type System.Management.Automation.SwitchParameter } It "Should have BulkCopyTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter BulkCopyTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter BulkCopyTimeout -Type System.Int32 } It "Should have CommandTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter CommandTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter CommandTimeout -Type System.Int32 } It "Should have UseDefaultFileGroup as a switch parameter" { - $CommandUnderTest | Should -HaveParameter UseDefaultFileGroup -Type Switch + $CommandUnderTest | Should -HaveParameter UseDefaultFileGroup -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type TableViewBase[] + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.TableViewBase[] } 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/Copy-DbaDbViewData.Tests.ps1 b/tests/Copy-DbaDbViewData.Tests.ps1 index dbe78eb52f..3e67d23d8c 100644 --- a/tests/Copy-DbaDbViewData.Tests.ps1 +++ b/tests/Copy-DbaDbViewData.Tests.ps1 @@ -66,68 +66,68 @@ Describe "Copy-DbaDbViewData" { BeforeAll { $CommandUnderTest = Get-Command Copy-DbaDbViewData } - It "Should have SqlInstance as a DbaInstanceParameter parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter + It "Should have SqlInstance as a Dataplat.Dbatools.Parameter.DbaInstanceParameter parameter" { + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } - It "Should have SqlCredential as a PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + It "Should have SqlCredential as a System.Management.Automation.PSCredential parameter" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } - It "Should have Destination as a DbaInstanceParameter[] parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter[] + It "Should have Destination as a Dataplat.Dbatools.Parameter.DbaInstanceParameter[] parameter" { + $CommandUnderTest | Should -HaveParameter Destination -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } - It "Should have DestinationSqlCredential as a PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + It "Should have DestinationSqlCredential as a System.Management.Automation.PSCredential parameter" { + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } - It "Should have Database as a String parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + It "Should have Database as a System.String parameter" { + $CommandUnderTest | Should -HaveParameter Database -Type System.String } - It "Should have DestinationDatabase as a String parameter" { - $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type String + It "Should have DestinationDatabase as a System.String parameter" { + $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type System.String } - It "Should have View as a String[] parameter" { - $CommandUnderTest | Should -HaveParameter View -Type String[] + It "Should have View as a System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter View -Type System.String[] } - It "Should have Query as a String parameter" { - $CommandUnderTest | Should -HaveParameter Query -Type String + It "Should have Query as a System.String parameter" { + $CommandUnderTest | Should -HaveParameter Query -Type System.String } - It "Should have AutoCreateTable as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type Switch + It "Should have AutoCreateTable as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type System.Management.Automation.SwitchParameter } - It "Should have BatchSize as an Int32 parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 + It "Should have BatchSize as a System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 } - It "Should have NotifyAfter as an Int32 parameter" { - $CommandUnderTest | Should -HaveParameter NotifyAfter -Type Int32 + It "Should have NotifyAfter as a System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter NotifyAfter -Type System.Int32 } - It "Should have DestinationTable as a String parameter" { - $CommandUnderTest | Should -HaveParameter DestinationTable -Type String + It "Should have DestinationTable as a System.String parameter" { + $CommandUnderTest | Should -HaveParameter DestinationTable -Type System.String } - It "Should have NoTableLock as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter NoTableLock -Type Switch + It "Should have NoTableLock as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter NoTableLock -Type System.Management.Automation.SwitchParameter } - It "Should have CheckConstraints as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter CheckConstraints -Type Switch + It "Should have CheckConstraints as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter CheckConstraints -Type System.Management.Automation.SwitchParameter } - It "Should have FireTriggers as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter FireTriggers -Type Switch + It "Should have FireTriggers as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter FireTriggers -Type System.Management.Automation.SwitchParameter } - It "Should have KeepIdentity as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter KeepIdentity -Type Switch + It "Should have KeepIdentity as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter KeepIdentity -Type System.Management.Automation.SwitchParameter } - It "Should have KeepNulls as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter KeepNulls -Type Switch + It "Should have KeepNulls as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter KeepNulls -Type System.Management.Automation.SwitchParameter } - It "Should have Truncate as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter Truncate -Type Switch + It "Should have Truncate as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter Truncate -Type System.Management.Automation.SwitchParameter } - It "Should have BulkCopyTimeOut as an Int32 parameter" { - $CommandUnderTest | Should -HaveParameter BulkCopyTimeOut -Type Int32 + It "Should have BulkCopyTimeOut as a System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter BulkCopyTimeOut -Type System.Int32 } - It "Should have InputObject as a TableViewBase[] parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type TableViewBase[] + It "Should have InputObject as a Microsoft.SqlServer.Management.Smo.TableViewBase[] parameter" { + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.TableViewBase[] } - It "Should have EnableException as a Switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + It "Should have EnableException as a System.Management.Automation.SwitchParameter parameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Copy-DbaEndpoint.Tests.ps1 b/tests/Copy-DbaEndpoint.Tests.ps1 index 5b4ae8bd6b..dba7fdfa16 100644 --- a/tests/Copy-DbaEndpoint.Tests.ps1 +++ b/tests/Copy-DbaEndpoint.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Copy-DbaEndpoint" { $CommandUnderTest = Get-Command Copy-DbaEndpoint } 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 Endpoint parameter" { - $CommandUnderTest | Should -HaveParameter Endpoint -Type Object[] + $CommandUnderTest | Should -HaveParameter Endpoint -Type System.Object[] } It "Should have ExcludeEndpoint parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeEndpoint -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeEndpoint -Type System.Object[] } 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/Copy-DbaInstanceAudit.Tests.ps1 b/tests/Copy-DbaInstanceAudit.Tests.ps1 index 87fda0474a..aabbc39a46 100644 --- a/tests/Copy-DbaInstanceAudit.Tests.ps1 +++ b/tests/Copy-DbaInstanceAudit.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Copy-DbaInstanceAudit" { $CommandUnderTest = Get-Command Copy-DbaInstanceAudit } 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 Audit as a parameter" { - $CommandUnderTest | Should -HaveParameter Audit -Type Object[] + $CommandUnderTest | Should -HaveParameter Audit -Type System.Object[] } It "Should have ExcludeAudit as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeAudit -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeAudit -Type System.Object[] } 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 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/Copy-DbaInstanceAuditSpecification.Tests.ps1 b/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 index 996fc60d45..703944806e 100644 --- a/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 +++ b/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Copy-DbaInstanceAuditSpecification" { $CommandUnderTest = Get-Command Copy-DbaInstanceAuditSpecification } 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 AuditSpecification as a parameter" { - $CommandUnderTest | Should -HaveParameter AuditSpecification -Type Object[] + $CommandUnderTest | Should -HaveParameter AuditSpecification -Type System.Object[] } It "Should have ExcludeAuditSpecification as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeAuditSpecification -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeAuditSpecification -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/Copy-DbaInstanceTrigger.Tests.ps1 b/tests/Copy-DbaInstanceTrigger.Tests.ps1 index 3691908c65..2e2f820670 100644 --- a/tests/Copy-DbaInstanceTrigger.Tests.ps1 +++ b/tests/Copy-DbaInstanceTrigger.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Copy-DbaInstanceTrigger" { $CommandUnderTest = Get-Command Copy-DbaInstanceTrigger } 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 ServerTrigger as a parameter" { - $CommandUnderTest | Should -HaveParameter ServerTrigger -Type Object[] + $CommandUnderTest | Should -HaveParameter ServerTrigger -Type System.Object[] } It "Should have ExcludeServerTrigger as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeServerTrigger -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeServerTrigger -Type System.Object[] } It "Should have Force as a switch parameter" { $CommandUnderTest | Should -HaveParameter Force -Type Switch diff --git a/tests/Copy-DbaLinkedServer.Tests.ps1 b/tests/Copy-DbaLinkedServer.Tests.ps1 index 1b7986be3f..0f7baec665 100644 --- a/tests/Copy-DbaLinkedServer.Tests.ps1 +++ b/tests/Copy-DbaLinkedServer.Tests.ps1 @@ -31,34 +31,34 @@ Describe "Copy-DbaLinkedServer" { $CommandUnderTest = Get-Command Copy-DbaLinkedServer } 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 LinkedServer as a parameter" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type Object[] + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.Object[] } It "Should have ExcludeLinkedServer as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLinkedServer -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeLinkedServer -Type System.Object[] } It "Should have UpgradeSqlClient as a switch parameter" { - $CommandUnderTest | Should -HaveParameter UpgradeSqlClient -Type Switch + $CommandUnderTest | Should -HaveParameter UpgradeSqlClient -Type System.Management.Automation.SwitchParameter } It "Should have ExcludePassword as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePassword -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludePassword -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/Copy-DbaLogin.Tests.ps1 b/tests/Copy-DbaLogin.Tests.ps1 index ea343ef019..02c41b99de 100644 --- a/tests/Copy-DbaLogin.Tests.ps1 +++ b/tests/Copy-DbaLogin.Tests.ps1 @@ -60,55 +60,55 @@ Describe "Copy-DbaLogin" { $CommandUnderTest = Get-Command Copy-DbaLogin } 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 Login parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type Object[] + $CommandUnderTest | Should -HaveParameter Login -Type System.Object[] } It "Should have ExcludeLogin parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type System.Object[] } It "Should have ExcludeSystemLogins parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemLogins -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemLogins -Type System.Management.Automation.SwitchParameter } It "Should have SyncSaName parameter" { - $CommandUnderTest | Should -HaveParameter SyncSaName -Type Switch + $CommandUnderTest | Should -HaveParameter SyncSaName -Type System.Management.Automation.SwitchParameter } It "Should have OutFile parameter" { - $CommandUnderTest | Should -HaveParameter OutFile -Type String + $CommandUnderTest | Should -HaveParameter OutFile -Type System.String } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have LoginRenameHashtable parameter" { - $CommandUnderTest | Should -HaveParameter LoginRenameHashtable -Type Hashtable + $CommandUnderTest | Should -HaveParameter LoginRenameHashtable -Type System.Collections.Hashtable } It "Should have KillActiveConnection parameter" { - $CommandUnderTest | Should -HaveParameter KillActiveConnection -Type Switch + $CommandUnderTest | Should -HaveParameter KillActiveConnection -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 ExcludePermissionSync parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePermissionSync -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludePermissionSync -Type System.Management.Automation.SwitchParameter } It "Should have NewSid parameter" { - $CommandUnderTest | Should -HaveParameter NewSid -Type Switch + $CommandUnderTest | Should -HaveParameter NewSid -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 } It "Should have ObjectLevel parameter" { - $CommandUnderTest | Should -HaveParameter ObjectLevel -Type Switch + $CommandUnderTest | Should -HaveParameter ObjectLevel -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Copy-DbaPolicyManagement.Tests.ps1 b/tests/Copy-DbaPolicyManagement.Tests.ps1 index ef8a82beb3..7916cdbaf7 100644 --- a/tests/Copy-DbaPolicyManagement.Tests.ps1 +++ b/tests/Copy-DbaPolicyManagement.Tests.ps1 @@ -6,34 +6,34 @@ Describe "Copy-DbaPolicyManagement" { $CommandUnderTest = Get-Command Copy-DbaPolicyManagement } 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 Policy parameter" { - $CommandUnderTest | Should -HaveParameter Policy -Type Object[] + $CommandUnderTest | Should -HaveParameter Policy -Type System.Object[] } It "Should have ExcludePolicy parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePolicy -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludePolicy -Type System.Object[] } It "Should have Condition parameter" { - $CommandUnderTest | Should -HaveParameter Condition -Type Object[] + $CommandUnderTest | Should -HaveParameter Condition -Type System.Object[] } It "Should have ExcludeCondition parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeCondition -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeCondition -Type System.Object[] } 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/Copy-DbaRegServer.Tests.ps1 b/tests/Copy-DbaRegServer.Tests.ps1 index 6efa843d07..4bd823ffda 100644 --- a/tests/Copy-DbaRegServer.Tests.ps1 +++ b/tests/Copy-DbaRegServer.Tests.ps1 @@ -10,28 +10,28 @@ Describe "Copy-DbaRegServer" { $CommandUnderTest = Get-Command Copy-DbaRegServer } 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 Group as a parameter" { - $CommandUnderTest | Should -HaveParameter Group -Type String[] + $CommandUnderTest | Should -HaveParameter Group -Type System.String[] } It "Should have SwitchServerName as a switch parameter" { - $CommandUnderTest | Should -HaveParameter SwitchServerName -Type Switch + $CommandUnderTest | Should -HaveParameter SwitchServerName -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/Copy-DbaSpConfigure.Tests.ps1 b/tests/Copy-DbaSpConfigure.Tests.ps1 index 27726afbb1..ed66873211 100644 --- a/tests/Copy-DbaSpConfigure.Tests.ps1 +++ b/tests/Copy-DbaSpConfigure.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Copy-DbaSpConfigure" { $CommandUnderTest = Get-Command Copy-DbaSpConfigure } 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 ConfigName as a parameter" { - $CommandUnderTest | Should -HaveParameter ConfigName -Type Object[] + $CommandUnderTest | Should -HaveParameter ConfigName -Type System.Object[] } It "Should have ExcludeConfigName as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeConfigName -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeConfigName -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/Copy-DbaSsisCatalog.Tests.ps1 b/tests/Copy-DbaSsisCatalog.Tests.ps1 index 926b9ac4bc..bb7eaf5288 100644 --- a/tests/Copy-DbaSsisCatalog.Tests.ps1 +++ b/tests/Copy-DbaSsisCatalog.Tests.ps1 @@ -12,37 +12,37 @@ Describe "Copy-DbaSsisCatalog" { $CommandUnderTest = Get-Command Copy-DbaSsisCatalog } It "Should have Source parameter" { - $CommandUnderTest | Should -HaveParameter Source -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Source -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have Destination parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Destination -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 DestinationSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } It "Should have Project parameter" { - $CommandUnderTest | Should -HaveParameter Project -Type String + $CommandUnderTest | Should -HaveParameter Project -Type System.String } It "Should have Folder parameter" { - $CommandUnderTest | Should -HaveParameter Folder -Type String + $CommandUnderTest | Should -HaveParameter Folder -Type System.String } It "Should have Environment parameter" { - $CommandUnderTest | Should -HaveParameter Environment -Type String + $CommandUnderTest | Should -HaveParameter Environment -Type System.String } It "Should have CreateCatalogPassword parameter" { - $CommandUnderTest | Should -HaveParameter CreateCatalogPassword -Type SecureString + $CommandUnderTest | Should -HaveParameter CreateCatalogPassword -Type System.Security.SecureString } It "Should have EnableSqlClr parameter" { - $CommandUnderTest | Should -HaveParameter EnableSqlClr -Type Switch + $CommandUnderTest | Should -HaveParameter EnableSqlClr -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/Copy-DbaStartupProcedure.Tests.ps1 b/tests/Copy-DbaStartupProcedure.Tests.ps1 index 6d217f37f3..e5f78a5490 100644 --- a/tests/Copy-DbaStartupProcedure.Tests.ps1 +++ b/tests/Copy-DbaStartupProcedure.Tests.ps1 @@ -26,28 +26,28 @@ Describe "Copy-DbaStartupProcedure" { $CommandUnderTest = Get-Command Copy-DbaStartupProcedure } 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 Procedure as a parameter" { - $CommandUnderTest | Should -HaveParameter Procedure -Type String[] + $CommandUnderTest | Should -HaveParameter Procedure -Type System.String[] } It "Should have ExcludeProcedure as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeProcedure -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeProcedure -Type System.String[] } 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/Copy-DbaSystemDbUserObject.Tests.ps1 b/tests/Copy-DbaSystemDbUserObject.Tests.ps1 index 4e1fc1c4ee..313d8cb90f 100644 --- a/tests/Copy-DbaSystemDbUserObject.Tests.ps1 +++ b/tests/Copy-DbaSystemDbUserObject.Tests.ps1 @@ -63,25 +63,25 @@ AS $CommandUnderTest = Get-Command Copy-DbaSystemDbUserObject } 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 Force as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type switch + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter } It "Should have Classic as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Classic -Type switch + $CommandUnderTest | Should -HaveParameter Classic -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/Copy-DbaXESession.Tests.ps1 b/tests/Copy-DbaXESession.Tests.ps1 index 5a2f30ebe2..fb14fccf84 100644 --- a/tests/Copy-DbaXESession.Tests.ps1 +++ b/tests/Copy-DbaXESession.Tests.ps1 @@ -10,28 +10,28 @@ Describe "Copy-DbaXESession" { $CommandUnderTest = Get-Command Copy-DbaXESession } It "Should have Source parameter" { - $CommandUnderTest | Should -HaveParameter Source -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Source -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have Destination parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Destination -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 DestinationSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } It "Should have XeSession parameter" { - $CommandUnderTest | Should -HaveParameter XeSession -Type Object[] + $CommandUnderTest | Should -HaveParameter XeSession -Type System.Object[] } It "Should have ExcludeXeSession parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeXeSession -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeXeSession -Type System.Object[] } 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/Copy-DbaXESessionTemplate.Tests.ps1 b/tests/Copy-DbaXESessionTemplate.Tests.ps1 index e2c6b73c70..79c8858938 100644 --- a/tests/Copy-DbaXESessionTemplate.Tests.ps1 +++ b/tests/Copy-DbaXESessionTemplate.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Copy-DbaXESessionTemplate" { BeforeAll { $CommandUnderTest = Get-Command Copy-DbaXESessionTemplate } - 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 Destination as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Destination -Type String -Mandatory:$false + It "Should have Destination as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Destination -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/Disable-DbaAgHadr.Tests.ps1 b/tests/Disable-DbaAgHadr.Tests.ps1 index 1c77209d50..1a6b3c71c0 100644 --- a/tests/Disable-DbaAgHadr.Tests.ps1 +++ b/tests/Disable-DbaAgHadr.Tests.ps1 @@ -10,16 +10,16 @@ Describe "Disable-DbaAgHadr" { $CommandUnderTest = Get-Command Disable-DbaAgHadr } 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 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/Disable-DbaDbEncryption.Tests.ps1 b/tests/Disable-DbaDbEncryption.Tests.ps1 index f4a9761386..5118327230 100644 --- a/tests/Disable-DbaDbEncryption.Tests.ps1 +++ b/tests/Disable-DbaDbEncryption.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Disable-DbaDbEncryption" { $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 InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have NoEncryptionKeyDrop as a parameter" { - $CommandUnderTest | Should -HaveParameter NoEncryptionKeyDrop -Type Switch + $CommandUnderTest | Should -HaveParameter NoEncryptionKeyDrop -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/Disable-DbaFilestream.Tests.ps1 b/tests/Disable-DbaFilestream.Tests.ps1 index aae7a3cd7d..a55485e0cb 100644 --- a/tests/Disable-DbaFilestream.Tests.ps1 +++ b/tests/Disable-DbaFilestream.Tests.ps1 @@ -9,16 +9,16 @@ Describe "Disable-DbaFilestream" { $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 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/Disable-DbaForceNetworkEncryption.Tests.ps1 b/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 index 56fea903c4..09c0b16aba 100644 --- a/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Disable-DbaForceNetworkEncryption" { $CommandUnderTest = Get-Command Disable-DbaForceNetworkEncryption } 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 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 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/Disable-DbaHideInstance.Tests.ps1 b/tests/Disable-DbaHideInstance.Tests.ps1 index 8bb05b4601..8dff00a928 100644 --- a/tests/Disable-DbaHideInstance.Tests.ps1 +++ b/tests/Disable-DbaHideInstance.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Disable-DbaHideInstance" { $CommandUnderTest = Get-Command Disable-DbaHideInstance } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Disable-DbaReplDistributor.Tests.ps1 b/tests/Disable-DbaReplDistributor.Tests.ps1 index d356cc5b43..5099657980 100644 --- a/tests/Disable-DbaReplDistributor.Tests.ps1 +++ b/tests/Disable-DbaReplDistributor.Tests.ps1 @@ -11,16 +11,16 @@ Describe "Disable-DbaReplDistributor" { $CommandUnderTest = Get-Command Disable-DbaReplDistributor } 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 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/Disable-DbaReplPublishing.Tests.ps1 b/tests/Disable-DbaReplPublishing.Tests.ps1 index 7e610c30c2..568f61c3ae 100644 --- a/tests/Disable-DbaReplPublishing.Tests.ps1 +++ b/tests/Disable-DbaReplPublishing.Tests.ps1 @@ -11,16 +11,16 @@ Describe "Disable-DbaReplPublishing" { $CommandUnderTest = Get-Command Disable-DbaReplPublishing } 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 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/Disable-DbaStartupProcedure.Tests.ps1 b/tests/Disable-DbaStartupProcedure.Tests.ps1 index 9ec9ec653d..f5e0936a8d 100644 --- a/tests/Disable-DbaStartupProcedure.Tests.ps1 +++ b/tests/Disable-DbaStartupProcedure.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Disable-DbaStartupProcedure" { $CommandUnderTest = Get-Command Disable-DbaStartupProcedure } 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 StartupProcedure parameter" { - $CommandUnderTest | Should -HaveParameter StartupProcedure -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StartupProcedure -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 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/Disable-DbaTraceFlag.Tests.ps1 b/tests/Disable-DbaTraceFlag.Tests.ps1 index aa5d681e90..ab6fcf778e 100644 --- a/tests/Disable-DbaTraceFlag.Tests.ps1 +++ b/tests/Disable-DbaTraceFlag.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Disable-DbaTraceFlag" { $CommandUnderTest = Get-Command Disable-DbaTraceFlag } 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 TraceFlag as a parameter" { - $CommandUnderTest | Should -HaveParameter TraceFlag -Type Int32[] + $CommandUnderTest | Should -HaveParameter TraceFlag -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/Disconnect-DbaInstance.Tests.ps1 b/tests/Disconnect-DbaInstance.Tests.ps1 index f811b6d600..b812eef43f 100644 --- a/tests/Disconnect-DbaInstance.Tests.ps1 +++ b/tests/Disconnect-DbaInstance.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Disconnect-DbaInstance" { $CommandUnderTest = Get-Command Disconnect-DbaInstance } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -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 } 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/Dismount-DbaDatabase.Tests.ps1 b/tests/Dismount-DbaDatabase.Tests.ps1 index 3929b25b81..fa249cf88f 100644 --- a/tests/Dismount-DbaDatabase.Tests.ps1 +++ b/tests/Dismount-DbaDatabase.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Dismount-DbaDatabase" { $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 InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have UpdateStatistics as a parameter" { - $CommandUnderTest | Should -HaveParameter UpdateStatistics -Type Switch + $CommandUnderTest | Should -HaveParameter UpdateStatistics -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/Enable-DbaAgHadr.Tests.ps1 b/tests/Enable-DbaAgHadr.Tests.ps1 index 776bd98019..4f0412a8f0 100644 --- a/tests/Enable-DbaAgHadr.Tests.ps1 +++ b/tests/Enable-DbaAgHadr.Tests.ps1 @@ -10,16 +10,16 @@ Describe "Enable-DbaAgHadr" { $CommandUnderTest = Get-Command Enable-DbaAgHadr } 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 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/Enable-DbaDbEncryption.Tests.ps1 b/tests/Enable-DbaDbEncryption.Tests.ps1 index 6cc9c20bf9..a61d1a9da1 100644 --- a/tests/Enable-DbaDbEncryption.Tests.ps1 +++ b/tests/Enable-DbaDbEncryption.Tests.ps1 @@ -11,20 +11,20 @@ Describe "Enable-DbaDbEncryption" { 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 EncryptorName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter EncryptorName -Type String -Mandatory:$false + It "Should have EncryptorName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter EncryptorName -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 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/Enable-DbaFilestream.Tests.ps1 b/tests/Enable-DbaFilestream.Tests.ps1 index a0a415e98e..d2baa0a59a 100644 --- a/tests/Enable-DbaFilestream.Tests.ps1 +++ b/tests/Enable-DbaFilestream.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Enable-DbaFilestream" { $CommandUnderTest = Get-Command Enable-DbaFilestream } 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 FileStreamLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter FileStreamLevel -Type String + $CommandUnderTest | Should -HaveParameter FileStreamLevel -Type System.String } It "Should have ShareName as a parameter" { - $CommandUnderTest | Should -HaveParameter ShareName -Type String + $CommandUnderTest | Should -HaveParameter ShareName -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/Enable-DbaForceNetworkEncryption.Tests.ps1 b/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 index 05e523915a..abebb52ec5 100644 --- a/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Enable-DbaForceNetworkEncryption" { $CommandUnderTest = Get-Command Enable-DbaForceNetworkEncryption } 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 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/Enable-DbaHideInstance.Tests.ps1 b/tests/Enable-DbaHideInstance.Tests.ps1 index bfaa47778b..a03be5b483 100644 --- a/tests/Enable-DbaHideInstance.Tests.ps1 +++ b/tests/Enable-DbaHideInstance.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Enable-DbaHideInstance" { $CommandUnderTest = Get-Command Enable-DbaHideInstance } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Enable-DbaReplDistributor.Tests.ps1 b/tests/Enable-DbaReplDistributor.Tests.ps1 index 82f08a21c3..79fc6db39d 100644 --- a/tests/Enable-DbaReplDistributor.Tests.ps1 +++ b/tests/Enable-DbaReplDistributor.Tests.ps1 @@ -10,23 +10,23 @@ Describe "Enable-DbaReplDistributor" { BeforeAll { $CommandUnderTest = Get-Command Enable-DbaReplDistributor } - 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 DistributionDatabase as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter DistributionDatabase -Type String -Mandatory:$false + It "Should have DistributionDatabase as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter DistributionDatabase -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/Enable-DbaReplPublishing.Tests.ps1 b/tests/Enable-DbaReplPublishing.Tests.ps1 index e7945a348a..fa01142b8a 100644 --- a/tests/Enable-DbaReplPublishing.Tests.ps1 +++ b/tests/Enable-DbaReplPublishing.Tests.ps1 @@ -11,25 +11,25 @@ Describe "Enable-DbaReplPublishing" { $CommandUnderTest = Get-Command Enable-DbaReplPublishing } 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 SnapshotShare as a parameter" { - $CommandUnderTest | Should -HaveParameter SnapshotShare -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SnapshotShare -Type System.String -Mandatory:$false } It "Should have PublisherSqlLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter PublisherSqlLogin -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PublisherSqlLogin -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/Enable-DbaStartupProcedure.Tests.ps1 b/tests/Enable-DbaStartupProcedure.Tests.ps1 index f9182c3058..e704431ca5 100644 --- a/tests/Enable-DbaStartupProcedure.Tests.ps1 +++ b/tests/Enable-DbaStartupProcedure.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Enable-DbaStartupProcedure" { $CommandUnderTest = Get-Command Enable-DbaStartupProcedure } 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 StartupProcedure as a parameter" { - $CommandUnderTest | Should -HaveParameter StartupProcedure -Type Object[] + $CommandUnderTest | Should -HaveParameter StartupProcedure -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/Enable-DbaTraceFlag.Tests.ps1 b/tests/Enable-DbaTraceFlag.Tests.ps1 index 171fcaf483..1841e2132b 100644 --- a/tests/Enable-DbaTraceFlag.Tests.ps1 +++ b/tests/Enable-DbaTraceFlag.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Enable-DbaTraceFlag" { $CommandUnderTest = Get-Command Enable-DbaTraceFlag } 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 TraceFlag as a parameter" { - $CommandUnderTest | Should -HaveParameter TraceFlag -Type Int32[] + $CommandUnderTest | Should -HaveParameter TraceFlag -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/Expand-DbaDbLogFile.Tests.ps1 b/tests/Expand-DbaDbLogFile.Tests.ps1 index f31f7758b8..551264f549 100644 --- a/tests/Expand-DbaDbLogFile.Tests.ps1 +++ b/tests/Expand-DbaDbLogFile.Tests.ps1 @@ -20,34 +20,34 @@ Describe "Expand-DbaDbLogFile" { $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 ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have TargetLogSize parameter" { - $CommandUnderTest | Should -HaveParameter TargetLogSize -Type Int32 + $CommandUnderTest | Should -HaveParameter TargetLogSize -Type System.Int32 } It "Should have IncrementSize parameter" { - $CommandUnderTest | Should -HaveParameter IncrementSize -Type Int32 + $CommandUnderTest | Should -HaveParameter IncrementSize -Type System.Int32 } It "Should have LogFileId parameter" { - $CommandUnderTest | Should -HaveParameter LogFileId -Type Int32 + $CommandUnderTest | Should -HaveParameter LogFileId -Type System.Int32 } It "Should have ShrinkLogFile parameter" { - $CommandUnderTest | Should -HaveParameter ShrinkLogFile -Type Switch + $CommandUnderTest | Should -HaveParameter ShrinkLogFile -Type System.Management.Automation.SwitchParameter } It "Should have ShrinkSize parameter" { - $CommandUnderTest | Should -HaveParameter ShrinkSize -Type Int32 + $CommandUnderTest | Should -HaveParameter ShrinkSize -Type System.Int32 } It "Should have BackupDirectory parameter" { - $CommandUnderTest | Should -HaveParameter BackupDirectory -Type String + $CommandUnderTest | Should -HaveParameter BackupDirectory -Type System.String } It "Should have ExcludeDiskSpaceValidation parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDiskSpaceValidation -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeDiskSpaceValidation -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/Export-DbaBinaryFile.Tests.ps1 b/tests/Export-DbaBinaryFile.Tests.ps1 index fc7692bfeb..65cfdc6b03 100644 --- a/tests/Export-DbaBinaryFile.Tests.ps1 +++ b/tests/Export-DbaBinaryFile.Tests.ps1 @@ -18,34 +18,34 @@ Describe "Export-DbaBinaryFile" { $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 Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -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 FileNameColumn as a parameter" { - $CommandUnderTest | Should -HaveParameter FileNameColumn -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileNameColumn -Type System.String -Mandatory:$false } It "Should have BinaryColumn as a parameter" { - $CommandUnderTest | Should -HaveParameter BinaryColumn -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BinaryColumn -Type System.String -Mandatory:$false } 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 Query as a parameter" { - $CommandUnderTest | Should -HaveParameter Query -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Query -Type System.String -Mandatory:$false } It "Should have FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type [Microsoft.SqlServer.Management.Smo.Table[]] -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/Export-DbaCredential.Tests.ps1 b/tests/Export-DbaCredential.Tests.ps1 index e725f422cf..c10d3ce9a7 100644 --- a/tests/Export-DbaCredential.Tests.ps1 +++ b/tests/Export-DbaCredential.Tests.ps1 @@ -8,8 +8,8 @@ Describe "Export-DbaCredential Unit Tests" -Tag 'UnitTests' { It "Should have SqlInstance as a non-mandatory parameter of type DbaInstanceParameter[]" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false } - It "Should have Identity as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Identity -Type String[] -Mandatory:$false + It "Should have Identity as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Identity -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 @@ -17,23 +17,23 @@ Describe "Export-DbaCredential Unit Tests" -Tag 'UnitTests' { It "Should have Credential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -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 FilePath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + It "Should have FilePath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } It "Should have ExcludePassword as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePassword -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludePassword -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Append as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Credential[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Credential[] -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/Export-DbaDacPackage.Tests.ps1 b/tests/Export-DbaDacPackage.Tests.ps1 index 3f63fefda9..f5b7065b31 100644 --- a/tests/Export-DbaDacPackage.Tests.ps1 +++ b/tests/Export-DbaDacPackage.Tests.ps1 @@ -5,44 +5,44 @@ Describe "Export-DbaDacPackage" { BeforeAll { $CommandUnderTest = Get-Command Export-DbaDacPackage } - 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 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have AllUserDatabases as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type System.Management.Automation.Switch -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 FilePath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + It "Should have FilePath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } - It "Should have DacOption as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter DacOption -Type Object -Mandatory:$false + It "Should have DacOption as a non-mandatory parameter of type System.Object" { + $CommandUnderTest | Should -HaveParameter DacOption -Type System.Object -Mandatory:$false } - It "Should have ExtendedParameters as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ExtendedParameters -Type String -Mandatory:$false + It "Should have ExtendedParameters as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ExtendedParameters -Type System.String -Mandatory:$false } - It "Should have ExtendedProperties as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ExtendedProperties -Type String -Mandatory:$false + It "Should have ExtendedProperties as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ExtendedProperties -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 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 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/Export-DbaDbRole.Tests.ps1 b/tests/Export-DbaDbRole.Tests.ps1 index 502dcaf2f3..7eb1216eee 100644 --- a/tests/Export-DbaDbRole.Tests.ps1 +++ b/tests/Export-DbaDbRole.Tests.ps1 @@ -6,58 +6,58 @@ Describe "Export-DbaDbRole Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Export-DbaDbRole } It "Should have SqlInstance 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 parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -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 ScriptingOptionsObject parameter" { $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions -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 Role parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Role -Type System.Object[] -Mandatory:$false } It "Should have ExcludeRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeRole -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeRole -Type System.Object[] -Mandatory:$false } It "Should have ExcludeFixedRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IncludeRoleMember parameter" { - $CommandUnderTest | Should -HaveParameter IncludeRoleMember -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeRoleMember -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } It "Should have FilePath parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } It "Should have Passthru parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have BatchSeparator parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String -Mandatory:$false } It "Should have NoClobber parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Append parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoPrefix parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPrefix -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Encoding parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Encoding -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/Export-DbaDbTableData.Tests.ps1 b/tests/Export-DbaDbTableData.Tests.ps1 index 62c2113448..60520a6416 100644 --- a/tests/Export-DbaDbTableData.Tests.ps1 +++ b/tests/Export-DbaDbTableData.Tests.ps1 @@ -9,31 +9,31 @@ Describe "Export-DbaDbTableData" { $CommandUnderTest | Should -HaveParameter InputObject -Type [Microsoft.SqlServer.Management.Smo.Table[]] -Mandatory:$false } 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 FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -Type [System.String] -Mandatory:$false } It "Should have Encoding as a parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Encoding -Type [System.String] -Mandatory:$false } It "Should have BatchSeparator as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type [System.String] -Mandatory:$false } It "Should have NoPrefix as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPrefix -Type [System.Management.Automation.SwitchParameter] -Mandatory:$false } It "Should have Passthru as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Passthru -Type [System.Management.Automation.SwitchParameter] -Mandatory:$false } It "Should have NoClobber as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type [System.Management.Automation.SwitchParameter] -Mandatory:$false } It "Should have Append as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -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/Export-DbaDiagnosticQuery.Tests.ps1 b/tests/Export-DbaDiagnosticQuery.Tests.ps1 index 509e119fe0..6524dc0d18 100644 --- a/tests/Export-DbaDiagnosticQuery.Tests.ps1 +++ b/tests/Export-DbaDiagnosticQuery.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Export-DbaDiagnosticQuery" { $CommandUnderTest = Get-Command Export-DbaDiagnosticQuery } 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 ConvertTo as a parameter" { - $CommandUnderTest | Should -HaveParameter ConvertTo -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ConvertTo -Type System.String -Mandatory:$false } It "Should have Path as a parameter" { $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 + $CommandUnderTest | Should -HaveParameter Suffix -Type System.String -Mandatory:$false } It "Should have NoPlanExport as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoPlanExport -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPlanExport -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoQueryExport as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoQueryExport -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoQueryExport -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/Export-DbaExecutionPlan.Tests.ps1 b/tests/Export-DbaExecutionPlan.Tests.ps1 index 49ef32b47b..0fe613623c 100644 --- a/tests/Export-DbaExecutionPlan.Tests.ps1 +++ b/tests/Export-DbaExecutionPlan.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Export-DbaExecutionPlan" { $CommandUnderTest = Get-Command Export-DbaExecutionPlan } 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 Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have SinceCreation parameter" { - $CommandUnderTest | Should -HaveParameter SinceCreation -Type DateTime + $CommandUnderTest | Should -HaveParameter SinceCreation -Type System.DateTime } It "Should have SinceLastExecution parameter" { - $CommandUnderTest | Should -HaveParameter SinceLastExecution -Type DateTime + $CommandUnderTest | Should -HaveParameter SinceLastExecution -Type System.DateTime } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -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/Export-DbaInstance.Tests.ps1 b/tests/Export-DbaInstance.Tests.ps1 index 60a669cfd3..07eba7a3fe 100644 --- a/tests/Export-DbaInstance.Tests.ps1 +++ b/tests/Export-DbaInstance.Tests.ps1 @@ -12,46 +12,46 @@ Describe "Export-DbaInstance Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Export-DbaInstance } 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 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 Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } It "Should have NoRecovery as a parameter" { - $CommandUnderTest | Should -HaveParameter NoRecovery -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoRecovery -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 IncludeDbMasterKey as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeDbMasterKey -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeDbMasterKey -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Exclude as a parameter" { - $CommandUnderTest | Should -HaveParameter Exclude -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Exclude -Type System.String[] -Mandatory:$false } It "Should have BatchSeparator as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String -Mandatory:$false } It "Should have ScriptingOption as a parameter" { $CommandUnderTest | Should -HaveParameter ScriptingOption -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions -Mandatory:$false } It "Should have NoPrefix as a parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPrefix -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExcludePassword as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePassword -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludePassword -Type System.Management.Automation.SwitchParameter -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 } } } @@ -247,7 +247,7 @@ Describe "Export-DbaInstance Integration Tests" -Tag "IntegrationTests" { } It "Exports logins" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 @@ -268,14 +268,14 @@ Describe "Export-DbaInstance Integration Tests" -Tag "IntegrationTests" { } It "Exports linked servers" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 } It "Exports system triggers" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 @@ -296,28 +296,28 @@ Describe "Export-DbaInstance Integration Tests" -Tag "IntegrationTests" { } It "Exports server audit specifications" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 } It "Exports endpoints" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 } It "Exports policies" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 } It "Exports resource governor settings" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 @@ -338,14 +338,14 @@ Describe "Export-DbaInstance Integration Tests" -Tag "IntegrationTests" { } It "Exports replication settings" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 } It "Exports system db user objects" { - $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SystemTriggers', 'OleDbProvider' + $results = Export-DbaInstance -SqlInstance $testServer -Path $exportDir -Exclude 'AgentServer', 'Audits', 'AvailabilityGroups', 'BackupDevices', 'CentralManagementServer', 'Credentials', 'CustomErrors', 'DatabaseMail', 'Databases', 'Endpoints', 'ExtendedEvents', 'LinkedServers', 'Logins', 'PolicyManagement', 'ReplicationSettings', 'ResourceGovernor', 'ServerAuditSpecifications', 'ServerRoles', 'SpConfigure', 'SysDbUserObjects', 'SystemTriggers', 'OleDbProvider' $results.FullName | Should -Exist $results.Count | Should -BeGreaterThan 0 diff --git a/tests/Export-DbaLinkedServer.Tests.ps1 b/tests/Export-DbaLinkedServer.Tests.ps1 index 5f2e58cd23..bee9e0e2bb 100644 --- a/tests/Export-DbaLinkedServer.Tests.ps1 +++ b/tests/Export-DbaLinkedServer.Tests.ps1 @@ -9,31 +9,31 @@ Describe "Export-DbaLinkedServer" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] } It "Should have LinkedServer as a parameter" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type String[] + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.String[] } 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 Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String } It "Should have ExcludePassword as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePassword -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludePassword -Type System.Management.Automation.SwitchParameter } It "Should have Append as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.LinkedServer[] } 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/Export-DbaLogin.Tests.ps1 b/tests/Export-DbaLogin.Tests.ps1 index 64fa0b85e5..be268626df 100644 --- a/tests/Export-DbaLogin.Tests.ps1 +++ b/tests/Export-DbaLogin.Tests.ps1 @@ -61,67 +61,67 @@ Describe "Export-DbaLogin" { $CommandUnderTest = Get-Command Export-DbaLogin } 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 InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type Object[] + $CommandUnderTest | Should -HaveParameter Login -Type System.Object[] } It "Should have ExcludeLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeLogin -Type System.Object[] } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object[] + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] } It "Should have ExcludeJobs as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJobs -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeJobs -Type System.Management.Automation.SwitchParameter } It "Should have ExcludeDatabase as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Management.Automation.SwitchParameter } It "Should have ExcludePassword as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePassword -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludePassword -Type System.Management.Automation.SwitchParameter } It "Should have DefaultDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter DefaultDatabase -Type String + $CommandUnderTest | Should -HaveParameter DefaultDatabase -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 FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String } It "Should have Encoding as a parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String + $CommandUnderTest | Should -HaveParameter Encoding -Type System.String } It "Should have NoClobber as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter } It "Should have Append as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.SwitchParameter } It "Should have BatchSeparator as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String } It "Should have DestinationVersion as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationVersion -Type String + $CommandUnderTest | Should -HaveParameter DestinationVersion -Type System.String } It "Should have NoPrefix as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch + $CommandUnderTest | Should -HaveParameter NoPrefix -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 ObjectLevel as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ObjectLevel -Type Switch + $CommandUnderTest | Should -HaveParameter ObjectLevel -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/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 b/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 index ac3740907f..a7f3526fcf 100644 --- a/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 +++ b/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 @@ -10,25 +10,25 @@ Describe "Export-DbaPfDataCollectorSetTemplate" { $CommandUnderTest = Get-Command Export-DbaPfDataCollectorSetTemplate } 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 CollectorSet as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter CollectorSet -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CollectorSet -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 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 InputObject as a non-mandatory Object[] parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] -Mandatory:$false + $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/Export-DbaRegServer.Tests.ps1 b/tests/Export-DbaRegServer.Tests.ps1 index c9221256ed..8d9039f5fd 100644 --- a/tests/Export-DbaRegServer.Tests.ps1 +++ b/tests/Export-DbaRegServer.Tests.ps1 @@ -15,28 +15,28 @@ Describe "Export-DbaRegServer" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have FilePath as a parameter" { $CommandUnderTest | Should -HaveParameter FilePath -Type System.IO.FileInfo } It "Should have CredentialPersistenceType as a parameter" { - $CommandUnderTest | Should -HaveParameter CredentialPersistenceType -Type String + $CommandUnderTest | Should -HaveParameter CredentialPersistenceType -Type System.String } It "Should have Group as a parameter" { - $CommandUnderTest | Should -HaveParameter Group -Type Object[] + $CommandUnderTest | Should -HaveParameter Group -Type System.Object[] } It "Should have ExcludeGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeGroup -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeGroup -Type System.Object[] } It "Should have Overwrite as a parameter" { - $CommandUnderTest | Should -HaveParameter Overwrite -Type Switch + $CommandUnderTest | Should -HaveParameter Overwrite -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/Export-DbaReplServerSetting.Tests.ps1 b/tests/Export-DbaReplServerSetting.Tests.ps1 index f09f1c0f86..808a88d4e7 100644 --- a/tests/Export-DbaReplServerSetting.Tests.ps1 +++ b/tests/Export-DbaReplServerSetting.Tests.ps1 @@ -19,32 +19,32 @@ Describe "Export-DbaReplServerSetting" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -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 FilePath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + It "Should have FilePath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } - It "Should have ScriptOption as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ScriptOption -Type Object[] -Mandatory:$false + It "Should have ScriptOption as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ScriptOption -Type System.Object[] -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 Encoding as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false + It "Should have Encoding as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Encoding -Type System.String -Mandatory:$false } It "Should have Passthru as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoClobber as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Append as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -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/Export-DbaScript.Tests.ps1 b/tests/Export-DbaScript.Tests.ps1 index 9858765709..51b4d6aaf4 100644 --- a/tests/Export-DbaScript.Tests.ps1 +++ b/tests/Export-DbaScript.Tests.ps1 @@ -12,37 +12,37 @@ Describe "Export-DbaScript" { $CommandUnderTest = Get-Command Export-DbaScript } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have ScriptingOptionsObject as a parameter" { - $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type ScriptingOptions + $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String } It "Should have Encoding as a parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String + $CommandUnderTest | Should -HaveParameter Encoding -Type System.String } It "Should have BatchSeparator as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String } It "Should have NoPrefix as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch + $CommandUnderTest | Should -HaveParameter NoPrefix -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 NoClobber as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter } It "Should have Append as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch + $CommandUnderTest | Should -HaveParameter Append -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/Export-DbaServerRole.Tests.ps1 b/tests/Export-DbaServerRole.Tests.ps1 index aa89f6aeb8..5e8d4f2547 100644 --- a/tests/Export-DbaServerRole.Tests.ps1 +++ b/tests/Export-DbaServerRole.Tests.ps1 @@ -18,49 +18,49 @@ Describe "Export-DbaServerRole Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -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 ScriptingOptionsObject parameter" { - $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type ScriptingOptions -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions -Mandatory:$false } It "Should have ServerRole parameter" { - $CommandUnderTest | Should -HaveParameter ServerRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ServerRole -Type System.String[] -Mandatory:$false } It "Should have ExcludeServerRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeServerRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeServerRole -Type System.String[] -Mandatory:$false } It "Should have ExcludeFixedRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IncludeRoleMember parameter" { - $CommandUnderTest | Should -HaveParameter IncludeRoleMember -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeRoleMember -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } It "Should have FilePath parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } It "Should have Passthru parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have BatchSeparator parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String -Mandatory:$false } It "Should have NoClobber parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Append parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoPrefix parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPrefix -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Encoding parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Encoding -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/Export-DbaSpConfigure.Tests.ps1 b/tests/Export-DbaSpConfigure.Tests.ps1 index e64842352a..8063a587e9 100644 --- a/tests/Export-DbaSpConfigure.Tests.ps1 +++ b/tests/Export-DbaSpConfigure.Tests.ps1 @@ -10,19 +10,19 @@ Describe "Export-DbaSpConfigure" { $CommandUnderTest = Get-Command Export-DbaSpConfigure } It "Should have SqlInstance 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 parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.String -Mandatory:$false } It "Should have FilePath parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -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/Export-DbaSysDbUserObject.Tests.ps1 b/tests/Export-DbaSysDbUserObject.Tests.ps1 index cd11a88114..a2671275b0 100644 --- a/tests/Export-DbaSysDbUserObject.Tests.ps1 +++ b/tests/Export-DbaSysDbUserObject.Tests.ps1 @@ -6,37 +6,37 @@ Describe "Export-DbaSysDbUserObject" { $CommandUnderTest = Get-Command Export-DbaSysDbUserObject } 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 IncludeDependencies as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeDependencies -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeDependencies -Type System.Management.Automation.SwitchParameter } It "Should have BatchSeparator as a string parameter" { - $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String + $CommandUnderTest | Should -HaveParameter BatchSeparator -Type System.String } It "Should have Path as a string parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } It "Should have FilePath as a string parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String } It "Should have NoPrefix as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch + $CommandUnderTest | Should -HaveParameter NoPrefix -Type System.Management.Automation.SwitchParameter } It "Should have ScriptingOptionsObject as a ScriptingOptions parameter" { - $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type ScriptingOptions + $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions } It "Should have NoClobber as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch + $CommandUnderTest | Should -HaveParameter NoClobber -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 EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Export-DbaUser.Tests.ps1 b/tests/Export-DbaUser.Tests.ps1 index 339f3070ca..a9bc27e03a 100644 --- a/tests/Export-DbaUser.Tests.ps1 +++ b/tests/Export-DbaUser.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Export-DbaUser Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Export-DbaUser } 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 InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -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 @@ -36,25 +36,25 @@ Describe "Export-DbaUser Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false } It "Should have NoClobber parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have Append parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have Passthru parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have Template parameter" { - $CommandUnderTest | Should -HaveParameter Template -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Template -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 } It "Should have ScriptingOptionsObject parameter" { $CommandUnderTest | Should -HaveParameter ScriptingOptionsObject -Type Microsoft.SqlServer.Management.Smo.ScriptingOptions -Mandatory:$false } It "Should have ExcludeGoBatchSeparator parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeGoBatchSeparator -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeGoBatchSeparator -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Export-DbaXECsv.Tests.ps1 b/tests/Export-DbaXECsv.Tests.ps1 index 738fb416dd..48926f2fcb 100644 --- a/tests/Export-DbaXECsv.Tests.ps1 +++ b/tests/Export-DbaXECsv.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Export-DbaXECsv" { $CommandUnderTest = Get-Command Export-DbaXECsv } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object[] + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object[] } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } 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/Export-DbaXESession.Tests.ps1 b/tests/Export-DbaXESession.Tests.ps1 index f787a63e5a..3847599d3b 100644 --- a/tests/Export-DbaXESession.Tests.ps1 +++ b/tests/Export-DbaXESession.Tests.ps1 @@ -19,10 +19,10 @@ Describe "Export-DbaXESession" { $CommandUnderTest = Get-Command Export-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 InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Session[] @@ -40,22 +40,22 @@ Describe "Export-DbaXESession" { $CommandUnderTest | Should -HaveParameter Encoding -Type String } It "Should have Passthru parameter" { - $CommandUnderTest | Should -HaveParameter Passthru -Type Switch + $CommandUnderTest | Should -HaveParameter Passthru -Type System.Management.Automation.SwitchParameter } It "Should have BatchSeparator parameter" { $CommandUnderTest | Should -HaveParameter BatchSeparator -Type String } It "Should have NoPrefix parameter" { - $CommandUnderTest | Should -HaveParameter NoPrefix -Type Switch + $CommandUnderTest | Should -HaveParameter NoPrefix -Type System.Management.Automation.SwitchParameter } It "Should have NoClobber parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter } It "Should have Append parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch + $CommandUnderTest | Should -HaveParameter Append -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/Export-DbaXESessionTemplate.Tests.ps1 b/tests/Export-DbaXESessionTemplate.Tests.ps1 index 2de4f39cc9..5f220c9f61 100644 --- a/tests/Export-DbaXESessionTemplate.Tests.ps1 +++ b/tests/Export-DbaXESessionTemplate.Tests.ps1 @@ -5,26 +5,26 @@ Describe "Export-DbaXESessionTemplate" { BeforeAll { $CommandUnderTest = Get-Command Export-DbaXESessionTemplate } - 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 Session as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter Session -Type Object[] -Mandatory:$false + It "Should have Session as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter Session -Type System.Object[] -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 FilePath as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter FilePath -Type String -Mandatory:$false + It "Should have FilePath as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter FilePath -Type System.String -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type Session[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.XEvent.Session[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Session[] -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/Find-DbaAgentJob.Tests.ps1 b/tests/Find-DbaAgentJob.Tests.ps1 index 2a15755fa9..75ebf454a8 100644 --- a/tests/Find-DbaAgentJob.Tests.ps1 +++ b/tests/Find-DbaAgentJob.Tests.ps1 @@ -12,46 +12,46 @@ Describe "Find-DbaAgentJob Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Find-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 JobName as a parameter" { - $CommandUnderTest | Should -HaveParameter JobName -Type String[] + $CommandUnderTest | Should -HaveParameter JobName -Type System.String[] } It "Should have ExcludeJobName as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJobName -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeJobName -Type System.String[] } It "Should have StepName as a parameter" { - $CommandUnderTest | Should -HaveParameter StepName -Type String[] + $CommandUnderTest | Should -HaveParameter StepName -Type System.String[] } It "Should have LastUsed as a parameter" { - $CommandUnderTest | Should -HaveParameter LastUsed -Type Int32 + $CommandUnderTest | Should -HaveParameter LastUsed -Type System.Int32 } It "Should have IsDisabled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsDisabled -Type Switch + $CommandUnderTest | Should -HaveParameter IsDisabled -Type System.Management.Automation.SwitchParameter } It "Should have IsFailed as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsFailed -Type Switch + $CommandUnderTest | Should -HaveParameter IsFailed -Type System.Management.Automation.SwitchParameter } It "Should have IsNotScheduled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsNotScheduled -Type Switch + $CommandUnderTest | Should -HaveParameter IsNotScheduled -Type System.Management.Automation.SwitchParameter } It "Should have IsNoEmailNotification as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsNoEmailNotification -Type Switch + $CommandUnderTest | Should -HaveParameter IsNoEmailNotification -Type System.Management.Automation.SwitchParameter } It "Should have Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String[] + $CommandUnderTest | Should -HaveParameter Category -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 Since as a parameter" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime } 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/Find-DbaBackup.Tests.ps1 b/tests/Find-DbaBackup.Tests.ps1 index d69aafdb0c..8d16e35657 100644 --- a/tests/Find-DbaBackup.Tests.ps1 +++ b/tests/Find-DbaBackup.Tests.ps1 @@ -17,19 +17,19 @@ Describe "Find-DbaBackup" { $CommandUnderTest = Get-Command Find-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 parameter" { - $CommandUnderTest | Should -HaveParameter CheckArchiveBit -Type Switch + $CommandUnderTest | Should -HaveParameter CheckArchiveBit -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/Find-DbaCommand.Tests.ps1 b/tests/Find-DbaCommand.Tests.ps1 index b9b50bcc79..7e56298176 100644 --- a/tests/Find-DbaCommand.Tests.ps1 +++ b/tests/Find-DbaCommand.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Find-DbaCommand" { $CommandUnderTest = Get-Command Find-DbaCommand } It "Should have Pattern as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String -Mandatory:$false } It "Should have Tag as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Tag -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Tag -Type System.String[] -Mandatory:$false } It "Should have Author as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Author -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Author -Type System.String -Mandatory:$false } It "Should have MinimumVersion as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter MinimumVersion -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MinimumVersion -Type System.String -Mandatory:$false } It "Should have MaximumVersion as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter MaximumVersion -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaximumVersion -Type System.String -Mandatory:$false } It "Should have Rebuild as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Rebuild -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Rebuild -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/Find-DbaDatabase.Tests.ps1 b/tests/Find-DbaDatabase.Tests.ps1 index 40cbc8a7e4..7530ab8c16 100644 --- a/tests/Find-DbaDatabase.Tests.ps1 +++ b/tests/Find-DbaDatabase.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Find-DbaDatabase" { $CommandUnderTest = Get-Command Find-DbaDatabase } 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 Property as a parameter" { - $CommandUnderTest | Should -HaveParameter Property -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Property -Type System.String -Mandatory:$false } It "Should have Pattern as a parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String -Mandatory:$false } It "Should have Exact as a parameter" { - $CommandUnderTest | Should -HaveParameter Exact -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Exact -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/Find-DbaDbDisabledIndex.Tests.ps1 b/tests/Find-DbaDbDisabledIndex.Tests.ps1 index f47a88e0fe..4f5ece4f1d 100644 --- a/tests/Find-DbaDbDisabledIndex.Tests.ps1 +++ b/tests/Find-DbaDbDisabledIndex.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Find-DbaDbDisabledIndex" { $CommandUnderTest = Get-Command Find-DbaDbDisabledIndex } 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 NoClobber as a parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Append as a parameter" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Append -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/Find-DbaDbDuplicateIndex.Tests.ps1 b/tests/Find-DbaDbDuplicateIndex.Tests.ps1 index bd8f50f147..1bb96ea906 100644 --- a/tests/Find-DbaDbDuplicateIndex.Tests.ps1 +++ b/tests/Find-DbaDbDuplicateIndex.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Find-DbaDbDuplicateIndex" { $CommandUnderTest = Get-Command Find-DbaDbDuplicateIndex } 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 IncludeOverlapping as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeOverlapping -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeOverlapping -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/Find-DbaDbGrowthEvent.Tests.ps1 b/tests/Find-DbaDbGrowthEvent.Tests.ps1 index 5359f78861..21f6f3430f 100644 --- a/tests/Find-DbaDbGrowthEvent.Tests.ps1 +++ b/tests/Find-DbaDbGrowthEvent.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Find-DbaDbGrowthEvent" { $CommandUnderTest = Get-Command Find-DbaDbGrowthEvent } 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 } 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 EventType as a parameter" { - $CommandUnderTest | Should -HaveParameter EventType -Type String + $CommandUnderTest | Should -HaveParameter EventType -Type System.String } It "Should have FileType as a parameter" { - $CommandUnderTest | Should -HaveParameter FileType -Type String + $CommandUnderTest | Should -HaveParameter FileType -Type System.String } It "Should have UseLocalTime as a parameter" { - $CommandUnderTest | Should -HaveParameter UseLocalTime -Type Switch + $CommandUnderTest | Should -HaveParameter UseLocalTime -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/Find-DbaDbUnusedIndex.Tests.ps1 b/tests/Find-DbaDbUnusedIndex.Tests.ps1 index 331664010c..e9889054a3 100644 --- a/tests/Find-DbaDbUnusedIndex.Tests.ps1 +++ b/tests/Find-DbaDbUnusedIndex.Tests.ps1 @@ -6,34 +6,34 @@ Describe "Find-DbaDbUnusedIndex" { $CommandUnderTest = Get-Command Find-DbaDbUnusedIndex } 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 ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have IgnoreUptime parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreUptime -Type Switch + $CommandUnderTest | Should -HaveParameter IgnoreUptime -Type System.Management.Automation.SwitchParameter } It "Should have Seeks parameter" { - $CommandUnderTest | Should -HaveParameter Seeks -Type Int32 + $CommandUnderTest | Should -HaveParameter Seeks -Type System.Int32 } It "Should have Scans parameter" { - $CommandUnderTest | Should -HaveParameter Scans -Type Int32 + $CommandUnderTest | Should -HaveParameter Scans -Type System.Int32 } It "Should have Lookups parameter" { - $CommandUnderTest | Should -HaveParameter Lookups -Type Int32 + $CommandUnderTest | Should -HaveParameter Lookups -Type System.Int32 } 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/Find-DbaInstance.Tests.ps1 b/tests/Find-DbaInstance.Tests.ps1 index 022575aaa4..c2da647404 100644 --- a/tests/Find-DbaInstance.Tests.ps1 +++ b/tests/Find-DbaInstance.Tests.ps1 @@ -5,35 +5,35 @@ Describe "Find-DbaInstance" { BeforeAll { $CommandUnderTest = Get-Command Find-DbaInstance } - 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 DiscoveryType as a non-mandatory parameter of type DbaInstanceDiscoveryType" { - $CommandUnderTest | Should -HaveParameter DiscoveryType -Type Dataplat.Dbatools.Types.DbaInstanceDiscoveryType -Mandatory:$false + It "Should have DiscoveryType as a non-mandatory parameter of type Dataplat.Dbatools.Discovery.DbaInstanceDiscoveryType" { + $CommandUnderTest | Should -HaveParameter DiscoveryType -Type Dataplat.Dbatools.Discovery.DbaInstanceDiscoveryType -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.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type Microsoft.SqlServer.Management.Smo.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 Microsoft.SqlServer.Management.Smo.PSCredential" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type Microsoft.SqlServer.Management.Smo.PSCredential -Mandatory:$false } - It "Should have ScanType as a non-mandatory parameter of type DbaInstanceScanType[]" { - $CommandUnderTest | Should -HaveParameter ScanType -Type Dataplat.Dbatools.Types.DbaInstanceScanType[] -Mandatory:$false + It "Should have ScanType as a non-mandatory parameter of type Dataplat.Dbatools.Discovery.DbaInstanceScanType[]" { + $CommandUnderTest | Should -HaveParameter ScanType -Type Dataplat.Dbatools.Discovery.DbaInstanceScanType[] -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 DomainController as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter DomainController -Type String -Mandatory:$false + It "Should have DomainController as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter DomainController -Type System.String -Mandatory:$false } - It "Should have TCPPort as a non-mandatory parameter of type Int32[]" { - $CommandUnderTest | Should -HaveParameter TCPPort -Type Int32[] -Mandatory:$false + It "Should have TCPPort as a non-mandatory parameter of type System.Int32[]" { + $CommandUnderTest | Should -HaveParameter TCPPort -Type System.Int32[] -Mandatory:$false } - It "Should have MinimumConfidence as a non-mandatory parameter of type DbaInstanceConfidenceLevel" { - $CommandUnderTest | Should -HaveParameter MinimumConfidence -Type Dataplat.Dbatools.Types.DbaInstanceConfidenceLevel -Mandatory:$false + It "Should have MinimumConfidence as a non-mandatory parameter of type Dataplat.Dbatools.Discovery.DbaInstanceConfidenceLevel" { + $CommandUnderTest | Should -HaveParameter MinimumConfidence -Type Dataplat.Dbatools.Discovery.DbaInstanceConfidenceLevel -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 } } @@ -50,7 +50,7 @@ Describe "Find-DbaInstance" { It "FullName is populated" { $results.FullName | Should -Not -BeNullOrEmpty } - It "TcpConnected is true" -Skip:([DbaInstanceParameter]$global:instance3).IsLocalHost { + It "TcpConnected is true" -Skip:([Dataplat.Dbatools.Parameter.DbaInstanceParameter]$global:instance3).IsLocalHost { $results.TcpConnected | Should -Be $true } It "successfully connects" { diff --git a/tests/Find-DbaLoginInGroup.Tests.ps1 b/tests/Find-DbaLoginInGroup.Tests.ps1 index 8bf605d6a5..d9915d8cd6 100644 --- a/tests/Find-DbaLoginInGroup.Tests.ps1 +++ b/tests/Find-DbaLoginInGroup.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Find-DbaLoginInGroup" { $CommandUnderTest = Get-Command Find-DbaLoginInGroup } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Find-DbaOrphanedFile.Tests.ps1 b/tests/Find-DbaOrphanedFile.Tests.ps1 index 161c7f0d2a..594f297e9c 100644 --- a/tests/Find-DbaOrphanedFile.Tests.ps1 +++ b/tests/Find-DbaOrphanedFile.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Find-DbaOrphanedFile" { $CommandUnderTest = Get-Command Find-DbaOrphanedFile } 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 String[] + $CommandUnderTest | Should -HaveParameter Path -Type System.String[] } It "Should have FileType as a parameter" { - $CommandUnderTest | Should -HaveParameter FileType -Type String[] + $CommandUnderTest | Should -HaveParameter FileType -Type System.String[] } It "Should have LocalOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter LocalOnly -Type Switch + $CommandUnderTest | Should -HaveParameter LocalOnly -Type System.Management.Automation.SwitchParameter } It "Should have RemoteOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter RemoteOnly -Type Switch + $CommandUnderTest | Should -HaveParameter RemoteOnly -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 } It "Should have Recurse as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Recurse -Type Switch + $CommandUnderTest | Should -HaveParameter Recurse -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Find-DbaSimilarTable.Tests.ps1 b/tests/Find-DbaSimilarTable.Tests.ps1 index be20d240c3..c0572947ca 100644 --- a/tests/Find-DbaSimilarTable.Tests.ps1 +++ b/tests/Find-DbaSimilarTable.Tests.ps1 @@ -11,29 +11,29 @@ Describe "Find-DbaSimilarTable" { 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 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have SchemaName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter SchemaName -Type String -Mandatory:$false + It "Should have SchemaName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter SchemaName -Type System.String -Mandatory:$false } - It "Should have TableName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter TableName -Type String -Mandatory:$false + It "Should have TableName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter TableName -Type System.String -Mandatory:$false } It "Should have ExcludeViews as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeViews -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeViews -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IncludeSystemDatabases as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have MatchPercentThreshold as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MatchPercentThreshold -Type Int32 -Mandatory:$false + It "Should have MatchPercentThreshold as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MatchPercentThreshold -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/Find-DbaStoredProcedure.Tests.ps1 b/tests/Find-DbaStoredProcedure.Tests.ps1 index 7f909f10b4..84fdc99ae1 100644 --- a/tests/Find-DbaStoredProcedure.Tests.ps1 +++ b/tests/Find-DbaStoredProcedure.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Find-DbaStoredProcedure Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Find-DbaStoredProcedure } 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 Pattern as a parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String } It "Should have IncludeSystemObjects as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type System.Management.Automation.SwitchParameter } It "Should have IncludeSystemDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -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/Find-DbaTrigger.Tests.ps1 b/tests/Find-DbaTrigger.Tests.ps1 index 29dd936d91..0305cb343e 100644 --- a/tests/Find-DbaTrigger.Tests.ps1 +++ b/tests/Find-DbaTrigger.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Find-DbaTrigger Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Find-DbaTrigger } 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.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 Pattern as a parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String } It "Should have TriggerLevel as a parameter" { - $CommandUnderTest | Should -HaveParameter TriggerLevel -Type String + $CommandUnderTest | Should -HaveParameter TriggerLevel -Type System.String } It "Should have IncludeSystemObjects as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type System.Management.Automation.SwitchParameter } It "Should have IncludeSystemDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -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/Find-DbaUserObject.Tests.ps1 b/tests/Find-DbaUserObject.Tests.ps1 index 9013c20512..35c76bf36e 100644 --- a/tests/Find-DbaUserObject.Tests.ps1 +++ b/tests/Find-DbaUserObject.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Find-DbaUserObject" { $CommandUnderTest = Get-Command Find-DbaUserObject } 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 Pattern as a parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String + $CommandUnderTest | Should -HaveParameter Pattern -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/Find-DbaView.Tests.ps1 b/tests/Find-DbaView.Tests.ps1 index dee8d89521..f4c6ac770b 100644 --- a/tests/Find-DbaView.Tests.ps1 +++ b/tests/Find-DbaView.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Find-DbaView" { $CommandUnderTest = Get-Command Find-DbaView } 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 Pattern as a parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String } It "Should have IncludeSystemObjects as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type System.Management.Automation.SwitchParameter } It "Should have IncludeSystemDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -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/Format-DbaBackupInformation.Tests.ps1 b/tests/Format-DbaBackupInformation.Tests.ps1 index b25145edd8..3a4389553b 100644 --- a/tests/Format-DbaBackupInformation.Tests.ps1 +++ b/tests/Format-DbaBackupInformation.Tests.ps1 @@ -12,46 +12,46 @@ Describe "Format-DbaBackupInformation" { $CommandUnderTest = Get-Command Format-DbaBackupInformation } It "Should have BackupHistory as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupHistory -Type Object[] + $CommandUnderTest | Should -HaveParameter BackupHistory -Type System.Object[] } It "Should have ReplaceDatabaseName as a parameter" { - $CommandUnderTest | Should -HaveParameter ReplaceDatabaseName -Type Object + $CommandUnderTest | Should -HaveParameter ReplaceDatabaseName -Type System.Object } It "Should have ReplaceDbNameInFile as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ReplaceDbNameInFile -Type Switch + $CommandUnderTest | Should -HaveParameter ReplaceDbNameInFile -Type System.Management.Automation.SwitchParameter } It "Should have DataFileDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter DataFileDirectory -Type String + $CommandUnderTest | Should -HaveParameter DataFileDirectory -Type System.String } It "Should have LogFileDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter LogFileDirectory -Type String + $CommandUnderTest | Should -HaveParameter LogFileDirectory -Type System.String } It "Should have DestinationFileStreamDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationFileStreamDirectory -Type String + $CommandUnderTest | Should -HaveParameter DestinationFileStreamDirectory -Type System.String } It "Should have DatabaseNamePrefix as a parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseNamePrefix -Type String + $CommandUnderTest | Should -HaveParameter DatabaseNamePrefix -Type System.String } It "Should have DatabaseFilePrefix as a parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseFilePrefix -Type String + $CommandUnderTest | Should -HaveParameter DatabaseFilePrefix -Type System.String } It "Should have DatabaseFileSuffix as a parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseFileSuffix -Type String + $CommandUnderTest | Should -HaveParameter DatabaseFileSuffix -Type System.String } It "Should have RebaseBackupFolder as a parameter" { - $CommandUnderTest | Should -HaveParameter RebaseBackupFolder -Type String + $CommandUnderTest | Should -HaveParameter RebaseBackupFolder -Type System.String } It "Should have Continue as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Continue -Type Switch + $CommandUnderTest | Should -HaveParameter Continue -Type System.Management.Automation.SwitchParameter } It "Should have FileMapping as a parameter" { - $CommandUnderTest | Should -HaveParameter FileMapping -Type Hashtable + $CommandUnderTest | Should -HaveParameter FileMapping -Type System.Collections.Hashtable } It "Should have PathSep as a parameter" { - $CommandUnderTest | Should -HaveParameter PathSep -Type String + $CommandUnderTest | Should -HaveParameter PathSep -Type System.String } 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/Get-DbaAgBackupHistory.Tests.ps1 b/tests/Get-DbaAgBackupHistory.Tests.ps1 index 96832ccdb4..79c25ca5f8 100644 --- a/tests/Get-DbaAgBackupHistory.Tests.ps1 +++ b/tests/Get-DbaAgBackupHistory.Tests.ps1 @@ -5,65 +5,65 @@ Describe "Get-DbaAgBackupHistory" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaAgBackupHistory } - 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 AvailabilityGroup as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String -Mandatory:$false + It "Should have AvailabilityGroup as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String -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 IncludeCopyOnly as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeCopyOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeCopyOnly -Type System.Management.Automation.Switch -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 Since as a non-mandatory parameter of type DateTime" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime -Mandatory:$false + It "Should have Since as a non-mandatory parameter of type System.DateTime" { + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime -Mandatory:$false } - It "Should have RecoveryFork as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter RecoveryFork -Type String -Mandatory:$false + It "Should have RecoveryFork as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter RecoveryFork -Type System.String -Mandatory:$false } It "Should have Last as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Last -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Last -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have LastFull as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter LastFull -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LastFull -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have LastDiff as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter LastDiff -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LastDiff -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have LastLog as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter LastLog -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LastLog -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have DeviceType as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter DeviceType -Type String[] -Mandatory:$false + It "Should have DeviceType as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter DeviceType -Type System.String[] -Mandatory:$false } It "Should have Raw as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Raw -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have LastLsn as a non-mandatory parameter of type BigInt" { - $CommandUnderTest | Should -HaveParameter LastLsn -Type BigInt -Mandatory:$false + It "Should have LastLsn as a non-mandatory parameter of type System.Int64" { + $CommandUnderTest | Should -HaveParameter LastLsn -Type System.Int64 -Mandatory:$false } It "Should have IncludeMirror as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeMirror -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeMirror -Type System.Management.Automation.Switch -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 LsnSort as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter LsnSort -Type String -Mandatory:$false + It "Should have LsnSort as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter LsnSort -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.Switch -Mandatory:$false } } } diff --git a/tests/Get-DbaAgDatabase.Tests.ps1 b/tests/Get-DbaAgDatabase.Tests.ps1 index 9435d0f94d..f17189fd66 100644 --- a/tests/Get-DbaAgDatabase.Tests.ps1 +++ b/tests/Get-DbaAgDatabase.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Get-DbaAgDatabase" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -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 Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] -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/Get-DbaAgHadr.Tests.ps1 b/tests/Get-DbaAgHadr.Tests.ps1 index 793eda1268..e273345273 100644 --- a/tests/Get-DbaAgHadr.Tests.ps1 +++ b/tests/Get-DbaAgHadr.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Get-DbaAgHadr" { $CommandUnderTest = Get-Command Get-DbaAgHadr } 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/Get-DbaAgReplica.Tests.ps1 b/tests/Get-DbaAgReplica.Tests.ps1 index f1343418db..d0eadcd3c5 100644 --- a/tests/Get-DbaAgReplica.Tests.ps1 +++ b/tests/Get-DbaAgReplica.Tests.ps1 @@ -11,22 +11,22 @@ Describe "Get-DbaAgReplica" { $CommandUnderTest = Get-Command Get-DbaAgReplica } 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 AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type System.String[] -Mandatory:$false } It "Should have Replica as a parameter" { - $CommandUnderTest | Should -HaveParameter Replica -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Replica -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] -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/Get-DbaAgentAlertCategory.Tests.ps1 b/tests/Get-DbaAgentAlertCategory.Tests.ps1 index 25bc32aede..67c3cf2785 100644 --- a/tests/Get-DbaAgentAlertCategory.Tests.ps1 +++ b/tests/Get-DbaAgentAlertCategory.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaAgentAlertCategory" { $CommandUnderTest = Get-Command Get-DbaAgentAlertCategory } 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 Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String[] + $CommandUnderTest | Should -HaveParameter Category -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/Get-DbaAgentJob.Tests.ps1 b/tests/Get-DbaAgentJob.Tests.ps1 index 0d239d48ae..5a5287b6d6 100644 --- a/tests/Get-DbaAgentJob.Tests.ps1 +++ b/tests/Get-DbaAgentJob.Tests.ps1 @@ -18,31 +18,31 @@ Describe "Get-DbaAgentJob Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 ExcludeJob parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeJob -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 Category parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Category -Type System.String[] -Mandatory:$false } It "Should have ExcludeCategory parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeCategory -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeCategory -Type System.String[] -Mandatory:$false } It "Should have ExcludeDisabledJobs parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDisabledJobs -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDisabledJobs -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IncludeExecution parameter" { - $CommandUnderTest | Should -HaveParameter IncludeExecution -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeExecution -Type System.Management.Automation.SwitchParameter -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 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/Get-DbaAgentJobCategory.Tests.ps1 b/tests/Get-DbaAgentJobCategory.Tests.ps1 index 562f34952f..03cbc6985b 100644 --- a/tests/Get-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Get-DbaAgentJobCategory.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaAgentJobCategory" { $CommandUnderTest = Get-Command Get-DbaAgentJobCategory } 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 Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String[] + $CommandUnderTest | Should -HaveParameter Category -Type System.String[] } It "Should have CategoryType as a parameter" { - $CommandUnderTest | Should -HaveParameter CategoryType -Type String + $CommandUnderTest | Should -HaveParameter CategoryType -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/Get-DbaAgentJobHistory.Tests.ps1 b/tests/Get-DbaAgentJobHistory.Tests.ps1 index 18361ff653..c39dc80437 100644 --- a/tests/Get-DbaAgentJobHistory.Tests.ps1 +++ b/tests/Get-DbaAgentJobHistory.Tests.ps1 @@ -18,31 +18,31 @@ Describe "Get-DbaAgentJobHistory Unit Tests" -Tag 'UnitTests' { $command | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Job parameter" { - $command | Should -HaveParameter Job -Type Object[] -Mandatory:$false + $command | Should -HaveParameter Job -Type System.Object[] -Mandatory:$false } It "Should have ExcludeJob parameter" { - $command | Should -HaveParameter ExcludeJob -Type Object[] -Mandatory:$false + $command | Should -HaveParameter ExcludeJob -Type System.Object[] -Mandatory:$false } It "Should have StartDate parameter" { - $command | Should -HaveParameter StartDate -Type DateTime -Mandatory:$false + $command | Should -HaveParameter StartDate -Type System.DateTime -Mandatory:$false } It "Should have EndDate parameter" { - $command | Should -HaveParameter EndDate -Type DateTime -Mandatory:$false + $command | Should -HaveParameter EndDate -Type System.DateTime -Mandatory:$false } It "Should have OutcomeType parameter" { - $command | Should -HaveParameter OutcomeType -Type CompletionResult -Mandatory:$false + $command | Should -HaveParameter OutcomeType -Type Microsoft.SqlServer.Management.Smo.Agent.CompletionResult -Mandatory:$false } It "Should have ExcludeJobSteps parameter" { - $command | Should -HaveParameter ExcludeJobSteps -Type Switch -Mandatory:$false + $command | Should -HaveParameter ExcludeJobSteps -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have WithOutputFile parameter" { - $command | Should -HaveParameter WithOutputFile -Type Switch -Mandatory:$false + $command | Should -HaveParameter WithOutputFile -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have JobCollection parameter" { $command | Should -HaveParameter JobCollection -Type Microsoft.SqlServer.Management.Smo.Agent.Job -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/Get-DbaAgentJobOutputFile.Tests.ps1 b/tests/Get-DbaAgentJobOutputFile.Tests.ps1 index d56c6fcb82..162eb1fe13 100644 --- a/tests/Get-DbaAgentJobOutputFile.Tests.ps1 +++ b/tests/Get-DbaAgentJobOutputFile.Tests.ps1 @@ -18,13 +18,13 @@ Describe "Get-DbaAgentJobOutputFile" { $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 ExcludeJob parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeJob -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeJob -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/Get-DbaAgentJobStep.Tests.ps1 b/tests/Get-DbaAgentJobStep.Tests.ps1 index 554eab2b52..b66b19402d 100644 --- a/tests/Get-DbaAgentJobStep.Tests.ps1 +++ b/tests/Get-DbaAgentJobStep.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Get-DbaAgentJobStep" { $CommandUnderTest = Get-Command Get-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 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 ExcludeDisabledJobs as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDisabledJobs -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeDisabledJobs -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/Get-DbaAgentLog.Tests.ps1 b/tests/Get-DbaAgentLog.Tests.ps1 index 416a9c706f..e6e2fe087e 100644 --- a/tests/Get-DbaAgentLog.Tests.ps1 +++ b/tests/Get-DbaAgentLog.Tests.ps1 @@ -10,16 +10,16 @@ Describe "Get-DbaAgentLog" { $CommandUnderTest = Get-Command Get-DbaAgentLog } 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 LogNumber as a parameter" { - $CommandUnderTest | Should -HaveParameter LogNumber -Type Int32[] + $CommandUnderTest | Should -HaveParameter LogNumber -Type System.Int32[] } It "Should have EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type SwitchParameter + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaAgentOperator.Tests.ps1 b/tests/Get-DbaAgentOperator.Tests.ps1 index e7a136e691..0ff89a1963 100644 --- a/tests/Get-DbaAgentOperator.Tests.ps1 +++ b/tests/Get-DbaAgentOperator.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaAgentOperator" { $CommandUnderTest = Get-Command Get-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 Object[] + $CommandUnderTest | Should -HaveParameter Operator -Type System.Object[] } It "Should have ExcludeOperator as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeOperator -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeOperator -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/Get-DbaAgentProxy.Tests.ps1 b/tests/Get-DbaAgentProxy.Tests.ps1 index 515e8cab17..84ca40df1d 100644 --- a/tests/Get-DbaAgentProxy.Tests.ps1 +++ b/tests/Get-DbaAgentProxy.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaAgentProxy" { $CommandUnderTest = Get-Command Get-DbaAgentProxy } 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 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch } } diff --git a/tests/Get-DbaAgentSchedule.Tests.ps1 b/tests/Get-DbaAgentSchedule.Tests.ps1 index 693e2c02b3..41ef674430 100644 --- a/tests/Get-DbaAgentSchedule.Tests.ps1 +++ b/tests/Get-DbaAgentSchedule.Tests.ps1 @@ -10,12 +10,12 @@ Describe "Get-DbaAgentSchedule Unit Tests" -Tag 'UnitTests' { $CommandName = Get-Command Get-DbaAgentSchedule } It "Should have the correct parameters" { - $CommandName | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false - $CommandName | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false - $CommandName | Should -HaveParameter Schedule -Type String[] -Mandatory:$false - $CommandName | Should -HaveParameter ScheduleUid -Type String[] -Mandatory:$false - $CommandName | Should -HaveParameter Id -Type Int32[] -Mandatory:$false - $CommandName | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandName | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false + $CommandName | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false + $CommandName | Should -HaveParameter Schedule -Type System.String[] -Mandatory:$false + $CommandName | Should -HaveParameter ScheduleUid -Type System.String[] -Mandatory:$false + $CommandName | Should -HaveParameter Id -Type System.Int32[] -Mandatory:$false + $CommandName | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Get-DbaAgentServer.Tests.ps1 b/tests/Get-DbaAgentServer.Tests.ps1 index 3ee16084d4..0688c9a25f 100644 --- a/tests/Get-DbaAgentServer.Tests.ps1 +++ b/tests/Get-DbaAgentServer.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaAgentServer" { $CommandUnderTest = Get-Command Get-DbaAgentServer } 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/Get-DbaAvailabilityGroup.Tests.ps1 b/tests/Get-DbaAvailabilityGroup.Tests.ps1 index f84d927620..d06f0d19ef 100644 --- a/tests/Get-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Get-DbaAvailabilityGroup.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command Get-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 IsPrimary as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IsPrimary -Type Switch + $CommandUnderTest | Should -HaveParameter IsPrimary -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/Get-DbaAvailableCollation.Tests.ps1 b/tests/Get-DbaAvailableCollation.Tests.ps1 index 09b337ab1d..4888a53616 100644 --- a/tests/Get-DbaAvailableCollation.Tests.ps1 +++ b/tests/Get-DbaAvailableCollation.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaAvailableCollation" { $CommandUnderTest = Get-Command Get-DbaAvailableCollation } 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/Get-DbaBackupDevice.Tests.ps1 b/tests/Get-DbaBackupDevice.Tests.ps1 index 9ebb1654c6..3aa3b646d7 100644 --- a/tests/Get-DbaBackupDevice.Tests.ps1 +++ b/tests/Get-DbaBackupDevice.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaBackupDevice" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaBackupDevice } - 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/Get-DbaBackupInformation.Tests.ps1 b/tests/Get-DbaBackupInformation.Tests.ps1 index aff2182e51..ae89e5c6bc 100644 --- a/tests/Get-DbaBackupInformation.Tests.ps1 +++ b/tests/Get-DbaBackupInformation.Tests.ps1 @@ -59,58 +59,58 @@ Describe "Get-DbaBackupInformation" { $CommandUnderTest = Get-Command Get-DbaBackupInformation } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.Object[] -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 DatabaseName parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DatabaseName -Type System.String[] -Mandatory:$false } It "Should have SourceInstance parameter" { - $CommandUnderTest | Should -HaveParameter SourceInstance -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SourceInstance -Type System.String[] -Mandatory:$false } It "Should have NoXpDirTree parameter" { - $CommandUnderTest | Should -HaveParameter NoXpDirTree -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoXpDirTree -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoXpDirRecurse parameter" { - $CommandUnderTest | Should -HaveParameter NoXpDirRecurse -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoXpDirRecurse -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have DirectoryRecurse parameter" { - $CommandUnderTest | Should -HaveParameter DirectoryRecurse -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter DirectoryRecurse -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 MaintenanceSolution parameter" { - $CommandUnderTest | Should -HaveParameter MaintenanceSolution -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaintenanceSolution -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IgnoreLogBackup parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreLogBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreLogBackup -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IgnoreDiffBackup parameter" { - $CommandUnderTest | Should -HaveParameter IgnoreDiffBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IgnoreDiffBackup -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExportPath parameter" { - $CommandUnderTest | Should -HaveParameter ExportPath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExportPath -Type System.String -Mandatory:$false } It "Should have AzureCredential parameter" { - $CommandUnderTest | Should -HaveParameter AzureCredential -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AzureCredential -Type System.String -Mandatory:$false } It "Should have Import parameter" { - $CommandUnderTest | Should -HaveParameter Import -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Import -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Anonymise parameter" { - $CommandUnderTest | Should -HaveParameter Anonymise -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Anonymise -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoClobber parameter" { - $CommandUnderTest | Should -HaveParameter NoClobber -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoClobber -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have PassThru parameter" { - $CommandUnderTest | Should -HaveParameter PassThru -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PassThru -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Get-DbaBinaryFileTable.Tests.ps1 b/tests/Get-DbaBinaryFileTable.Tests.ps1 index aa8ea5a2b2..11f3cc615d 100644 --- a/tests/Get-DbaBinaryFileTable.Tests.ps1 +++ b/tests/Get-DbaBinaryFileTable.Tests.ps1 @@ -25,25 +25,25 @@ Describe "Get-DbaBinaryFileTable" { $CommandUnderTest = Get-Command Get-DbaBinaryFileTable } 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 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.Table[]] } 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/Get-DbaBuild.Tests.ps1 b/tests/Get-DbaBuild.Tests.ps1 index c780b9e868..678025e0f4 100644 --- a/tests/Get-DbaBuild.Tests.ps1 +++ b/tests/Get-DbaBuild.Tests.ps1 @@ -15,31 +15,31 @@ Describe "Get-DbaBuild" { $CommandUnderTest = Get-Command Get-DbaBuild } It "Should have Build parameter" { - $CommandUnderTest | Should -HaveParameter Build -Type Version[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Build -Type System.Version[] -Mandatory:$false } It "Should have Kb parameter" { - $CommandUnderTest | Should -HaveParameter Kb -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Kb -Type System.String[] -Mandatory:$false } It "Should have MajorVersion parameter" { - $CommandUnderTest | Should -HaveParameter MajorVersion -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MajorVersion -Type System.String -Mandatory:$false } It "Should have ServicePack parameter" { - $CommandUnderTest | Should -HaveParameter ServicePack -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ServicePack -Type System.String -Mandatory:$false } It "Should have CumulativeUpdate parameter" { - $CommandUnderTest | Should -HaveParameter CumulativeUpdate -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CumulativeUpdate -Type System.String -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.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/Get-DbaClientAlias.Tests.ps1 b/tests/Get-DbaClientAlias.Tests.ps1 index 6c820a823b..8b1363e655 100644 --- a/tests/Get-DbaClientAlias.Tests.ps1 +++ b/tests/Get-DbaClientAlias.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaClientAlias" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaClientAlias } - 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/Get-DbaClientProtocol.Tests.ps1 b/tests/Get-DbaClientProtocol.Tests.ps1 index 694228d37c..214fac3d6c 100644 --- a/tests/Get-DbaClientProtocol.Tests.ps1 +++ b/tests/Get-DbaClientProtocol.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaClientProtocol" { $CommandUnderTest = Get-Command Get-DbaClientProtocol } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaCmConnection.Tests.ps1 b/tests/Get-DbaCmConnection.Tests.ps1 index 2bddbc4a61..cd532b8e6c 100644 --- a/tests/Get-DbaCmConnection.Tests.ps1 +++ b/tests/Get-DbaCmConnection.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaCmConnection" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaCmConnection } - It "Should have ComputerName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type String[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.String[] -Mandatory:$false } - It "Should have UserName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter UserName -Type String -Mandatory:$false + It "Should have UserName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter UserName -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/Get-DbaCmObject.Tests.ps1 b/tests/Get-DbaCmObject.Tests.ps1 index 4aec6d5d5b..f2c5c06809 100644 --- a/tests/Get-DbaCmObject.Tests.ps1 +++ b/tests/Get-DbaCmObject.Tests.ps1 @@ -11,32 +11,32 @@ Describe "Get-DbaCmObject" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaCmObject } - It "Should have ClassName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ClassName -Type String -Mandatory:$false + It "Should have ClassName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter ClassName -Type System.String -Mandatory:$false } - It "Should have Query as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Query -Type String -Mandatory:$false + It "Should have Query as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Query -Type System.String -Mandatory:$false } - It "Should have ComputerName as a non-mandatory DbaCmConnectionParameter[] parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaCmConnectionParameter[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory Dataplat.Dbatools.Parameter.DbaCmConnectionParameter[] parameter" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaCmConnectionParameter[] -Mandatory:$false } - It "Should have Credential as a non-mandatory PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + It "Should have Credential as a non-mandatory System.Management.Automation.PSCredential parameter" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } - It "Should have Namespace as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Namespace -Type String -Mandatory:$false + It "Should have Namespace as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Namespace -Type System.String -Mandatory:$false } - It "Should have DoNotUse as a non-mandatory ManagementConnectionType[] parameter" { + It "Should have DoNotUse as a non-mandatory Dataplat.Dbatools.Connection.ManagementConnectionType[] parameter" { $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 + It "Should have Force as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Force -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 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/Get-DbaComputerCertificate.Tests.ps1 b/tests/Get-DbaComputerCertificate.Tests.ps1 index 65d7582fed..6dc4bed9ca 100644 --- a/tests/Get-DbaComputerCertificate.Tests.ps1 +++ b/tests/Get-DbaComputerCertificate.Tests.ps1 @@ -10,29 +10,29 @@ Describe "Get-DbaComputerCertificate" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaComputerCertificate } - 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 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/Get-DbaComputerSystem.Tests.ps1 b/tests/Get-DbaComputerSystem.Tests.ps1 index a03c40e4cf..81a4d8bdd7 100644 --- a/tests/Get-DbaComputerSystem.Tests.ps1 +++ b/tests/Get-DbaComputerSystem.Tests.ps1 @@ -10,16 +10,16 @@ Describe "Get-DbaComputerSystem" { $CommandUnderTest = Get-Command Get-DbaComputerSystem } 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 IncludeAws as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeAws -Type switch + $CommandUnderTest | Should -HaveParameter IncludeAws -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/Get-DbaConnection.Tests.ps1 b/tests/Get-DbaConnection.Tests.ps1 index cdbf13b9f2..62124d3a42 100644 --- a/tests/Get-DbaConnection.Tests.ps1 +++ b/tests/Get-DbaConnection.Tests.ps1 @@ -9,14 +9,14 @@ Describe "Get-DbaConnection" { BeforeAll { $CommandUnderTest = Get-Command Get-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 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/Get-DbaCpuRingBuffer.Tests.ps1 b/tests/Get-DbaCpuRingBuffer.Tests.ps1 index 5cb42dc645..4bae0ad71e 100644 --- a/tests/Get-DbaCpuRingBuffer.Tests.ps1 +++ b/tests/Get-DbaCpuRingBuffer.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaCpuRingBuffer" { $CommandUnderTest = Get-Command Get-DbaCpuRingBuffer } 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 SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have CollectionMinutes as a parameter" { - $CommandUnderTest | Should -HaveParameter CollectionMinutes -Type Int32 + $CommandUnderTest | Should -HaveParameter CollectionMinutes -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/Get-DbaCpuUsage.Tests.ps1 b/tests/Get-DbaCpuUsage.Tests.ps1 index 905cb511ad..938956d91f 100644 --- a/tests/Get-DbaCpuUsage.Tests.ps1 +++ b/tests/Get-DbaCpuUsage.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaCpuUsage" { $CommandUnderTest = Get-Command Get-DbaCpuUsage } 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 Threshold as a parameter" { - $CommandUnderTest | Should -HaveParameter Threshold -Type Int32 + $CommandUnderTest | Should -HaveParameter Threshold -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/Get-DbaCredential.Tests.ps1 b/tests/Get-DbaCredential.Tests.ps1 index 0ded58a46c..287c81d1bf 100644 --- a/tests/Get-DbaCredential.Tests.ps1 +++ b/tests/Get-DbaCredential.Tests.ps1 @@ -42,19 +42,19 @@ Describe "Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaCustomError.Tests.ps1 b/tests/Get-DbaCustomError.Tests.ps1 index 4df3e96d97..e1ab48d3c0 100644 --- a/tests/Get-DbaCustomError.Tests.ps1 +++ b/tests/Get-DbaCustomError.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaCustomError" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaCustomError } - 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/Get-DbaDBFileGroup.Tests.ps1 b/tests/Get-DbaDBFileGroup.Tests.ps1 index 2e2cb2adac..d5ef1da270 100644 --- a/tests/Get-DbaDBFileGroup.Tests.ps1 +++ b/tests/Get-DbaDBFileGroup.Tests.ps1 @@ -23,22 +23,22 @@ Describe "Get-DbaDbFileGroup" { $CommandUnderTest = Get-Command Get-DbaDbFileGroup } 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 InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -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 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/Get-DbaDatabase.Tests.ps1 b/tests/Get-DbaDatabase.Tests.ps1 index 8e78bc250f..0b08982d33 100644 --- a/tests/Get-DbaDatabase.Tests.ps1 +++ b/tests/Get-DbaDatabase.Tests.ps1 @@ -5,59 +5,59 @@ Describe "Get-DbaDatabase" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDatabase } - 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 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 ExcludeUser as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeUser -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeUser -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have ExcludeSystem as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have Owner as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Owner -Type String[] -Mandatory:$false + It "Should have Owner as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Owner -Type System.String[] -Mandatory:$false } It "Should have Encrypted as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter Encrypted -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Encrypted -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have Status as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Status -Type String[] -Mandatory:$false + It "Should have Status as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Status -Type System.String[] -Mandatory:$false } - It "Should have Access as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Access -Type String -Mandatory:$false + It "Should have Access as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Access -Type System.String -Mandatory:$false } - It "Should have RecoveryModel as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter RecoveryModel -Type String[] -Mandatory:$false + It "Should have RecoveryModel as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter RecoveryModel -Type System.String[] -Mandatory:$false } It "Should have NoFullBackup as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NoFullBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoFullBackup -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have NoFullBackupSince as a non-mandatory parameter of type DateTime" { - $CommandUnderTest | Should -HaveParameter NoFullBackupSince -Type DateTime -Mandatory:$false + It "Should have NoFullBackupSince as a non-mandatory parameter of type System.DateTime" { + $CommandUnderTest | Should -HaveParameter NoFullBackupSince -Type System.DateTime -Mandatory:$false } It "Should have NoLogBackup as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter NoLogBackup -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoLogBackup -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have NoLogBackupSince as a non-mandatory parameter of type DateTime" { - $CommandUnderTest | Should -HaveParameter NoLogBackupSince -Type DateTime -Mandatory:$false + It "Should have NoLogBackupSince as a non-mandatory parameter of type System.DateTime" { + $CommandUnderTest | Should -HaveParameter NoLogBackupSince -Type System.DateTime -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 IncludeLastUsed as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeLastUsed -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeLastUsed -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have OnlyAccessible as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter OnlyAccessible -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter OnlyAccessible -Type System.Management.Automation.Switch -Mandatory:$false } } diff --git a/tests/Get-DbaDbAssembly.Tests.ps1 b/tests/Get-DbaDbAssembly.Tests.ps1 index 0a02e493c7..e6d262726f 100644 --- a/tests/Get-DbaDbAssembly.Tests.ps1 +++ b/tests/Get-DbaDbAssembly.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaDbAssembly" { $CommandUnderTest = Get-Command Get-DbaDbAssembly } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaDbAsymmetricKey.Tests.ps1 b/tests/Get-DbaDbAsymmetricKey.Tests.ps1 index b958842ae2..81699cc8bb 100644 --- a/tests/Get-DbaDbAsymmetricKey.Tests.ps1 +++ b/tests/Get-DbaDbAsymmetricKey.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Get-DbaDbAsymmetricKey" { $CommandUnderTest = Get-Command Get-DbaDbAsymmetricKey } 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 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.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/Get-DbaDbBackupHistory.Tests.ps1 b/tests/Get-DbaDbBackupHistory.Tests.ps1 index d58e401e3c..b4da9ea0bf 100644 --- a/tests/Get-DbaDbBackupHistory.Tests.ps1 +++ b/tests/Get-DbaDbBackupHistory.Tests.ps1 @@ -27,7 +27,7 @@ Describe "Get-DbaDbBackupHistory Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter Since -Type PSObject -Mandatory:$false } It "Should have RecoveryFork as a parameter" { - $CommandUnderTest | Should -HaveParameter RecoveryFork -Type string -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RecoveryFork -Type System.String -Mandatory:$false } It "Should have Last as a switch parameter" { $CommandUnderTest | Should -HaveParameter Last -Type switch -Mandatory:$false @@ -42,19 +42,19 @@ Describe "Get-DbaDbBackupHistory Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter LastLog -Type switch -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 Raw as a switch parameter" { $CommandUnderTest | Should -HaveParameter Raw -Type switch -Mandatory:$false } It "Should have LastLsn as a parameter" { - $CommandUnderTest | Should -HaveParameter LastLsn -Type BigInt -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LastLsn -Type System.Int64 -Mandatory:$false } It "Should have IncludeMirror as a switch parameter" { $CommandUnderTest | Should -HaveParameter IncludeMirror -Type switch -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 AgCheck as a switch parameter" { $CommandUnderTest | Should -HaveParameter AgCheck -Type switch -Mandatory:$false @@ -63,7 +63,7 @@ Describe "Get-DbaDbBackupHistory Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter IgnoreDiffBackup -Type switch -Mandatory:$false } It "Should have LsnSort as a parameter" { - $CommandUnderTest | Should -HaveParameter LsnSort -Type string -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LsnSort -Type System.String -Mandatory:$false } It "Should have EnableException as a switch parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type switch -Mandatory:$false @@ -199,7 +199,6 @@ Describe "Get-DbaDbBackupHistory Integration Tests" -Tag "IntegrationTests" { $null = Backup-DbaDatabase -SqlInstance $server -Database $dbname -Type Full -BackupDirectory $DestBackupDir 1 .. 1000 | ForEach-Object -Process { $database.ExecuteNonQuery("INSERT INTO dbo.test DEFAULT VALUES") } $null = Backup-DbaDatabase -SqlInstance $server -Database $dbname -Type Full -BackupDirectory $DestBackupDir - 1 .. 1000 | ForEach-Object -Process { $database.ExecuteNonQuery("INSERT INTO dbo.test DEFAULT VALUES") } $null = Backup-DbaDatabase -SqlInstance $server -Database $dbname -Type Full -BackupDirectory $DestBackupDir $interResults = Get-DbaDbBackupHistory -SqlInstance $server -Database $dbname | Sort-Object -Property End diff --git a/tests/Get-DbaDbCertificate.Tests.ps1 b/tests/Get-DbaDbCertificate.Tests.ps1 index 52b9986271..640dafc0f5 100644 --- a/tests/Get-DbaDbCertificate.Tests.ps1 +++ b/tests/Get-DbaDbCertificate.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Get-DbaDbCertificate" { $CommandUnderTest = Get-Command Get-DbaDbCertificate } 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 ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have Certificate as a parameter" { - $CommandUnderTest | Should -HaveParameter Certificate -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Certificate -Type System.Object[] -Mandatory:$false } It "Should have Subject as a parameter" { - $CommandUnderTest | Should -HaveParameter Subject -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Subject -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.Switch -Mandatory:$false } } diff --git a/tests/Get-DbaDbCheckConstraint.Tests.ps1 b/tests/Get-DbaDbCheckConstraint.Tests.ps1 index 09d2506910..a1a511ede7 100644 --- a/tests/Get-DbaDbCheckConstraint.Tests.ps1 +++ b/tests/Get-DbaDbCheckConstraint.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbCheckConstraint Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-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 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/Get-DbaDbCompatibility.Tests.ps1 b/tests/Get-DbaDbCompatibility.Tests.ps1 index 3dc68e0c0f..64a14f76d4 100644 --- a/tests/Get-DbaDbCompatibility.Tests.ps1 +++ b/tests/Get-DbaDbCompatibility.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaDbCompatibility" { $CommandUnderTest = Get-Command Get-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 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.SwitchParameter } } diff --git a/tests/Get-DbaDbCompression.Tests.ps1 b/tests/Get-DbaDbCompression.Tests.ps1 index c17bf6e8e5..ee65f1494c 100644 --- a/tests/Get-DbaDbCompression.Tests.ps1 +++ b/tests/Get-DbaDbCompression.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbCompression" { $CommandUnderTest = Get-Command Get-DbaDbCompression } 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 ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -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/Get-DbaDbDbccOpenTran.Tests.ps1 b/tests/Get-DbaDbDbccOpenTran.Tests.ps1 index c486ddf20a..e6befb45dc 100644 --- a/tests/Get-DbaDbDbccOpenTran.Tests.ps1 +++ b/tests/Get-DbaDbDbccOpenTran.Tests.ps1 @@ -10,16 +10,16 @@ Describe "Get-DbaDbDbccOpenTran" { $CommandUnderTest = Get-Command Get-DbaDbDbccOpenTran } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 b/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 index b363508bdd..93ef473793 100644 --- a/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 +++ b/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaDbDetachedFileInfo" { $CommandUnderTest = Get-Command Get-DbaDbDetachedFileInfo } 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 String[] + $CommandUnderTest | Should -HaveParameter Path -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/Get-DbaDbEncryption.Tests.ps1 b/tests/Get-DbaDbEncryption.Tests.ps1 index a264064df7..297e06d19c 100644 --- a/tests/Get-DbaDbEncryption.Tests.ps1 +++ b/tests/Get-DbaDbEncryption.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbEncryption" { $CommandUnderTest = Get-Command Get-DbaDbEncryption } 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 IncludeSystemDBs as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -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/Get-DbaDbEncryptionKey.Tests.ps1 b/tests/Get-DbaDbEncryptionKey.Tests.ps1 index 7c485e44ca..51847d4f86 100644 --- a/tests/Get-DbaDbEncryptionKey.Tests.ps1 +++ b/tests/Get-DbaDbEncryptionKey.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbEncryptionKey" { $CommandUnderTest = Get-Command Get-DbaDbEncryptionKey } 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 ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -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/Get-DbaDbExtentDiff.Tests.ps1 b/tests/Get-DbaDbExtentDiff.Tests.ps1 index 44da988f48..4a58c25f1d 100644 --- a/tests/Get-DbaDbExtentDiff.Tests.ps1 +++ b/tests/Get-DbaDbExtentDiff.Tests.ps1 @@ -20,19 +20,19 @@ Describe "Get-DbaDbExtentDiff" { $CommandUnderTest = Get-Command Get-DbaDbExtentDiff } 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/Get-DbaDbFeatureUsage.Tests.ps1 b/tests/Get-DbaDbFeatureUsage.Tests.ps1 index cd57187e63..20c9638a3d 100644 --- a/tests/Get-DbaDbFeatureUsage.Tests.ps1 +++ b/tests/Get-DbaDbFeatureUsage.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbFeatureUsage" { $CommandUnderTest = Get-Command Get-DbaDbFeatureUsage } 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/Get-DbaDbFile.Tests.ps1 b/tests/Get-DbaDbFile.Tests.ps1 index e1479e8868..11439798b8 100644 --- a/tests/Get-DbaDbFile.Tests.ps1 +++ b/tests/Get-DbaDbFile.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaDbFile" { $CommandUnderTest = Get-Command Get-DbaDbFile } 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 Microsoft.SqlServer.Management.Smo.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 FileGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter FileGroup -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileGroup -Type System.Object[] -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.Switch -Mandatory:$false } } diff --git a/tests/Get-DbaDbFileGrowth.Tests.ps1 b/tests/Get-DbaDbFileGrowth.Tests.ps1 index 518ff1b745..5c7b24a4e1 100644 --- a/tests/Get-DbaDbFileGrowth.Tests.ps1 +++ b/tests/Get-DbaDbFileGrowth.Tests.ps1 @@ -9,20 +9,20 @@ Describe "Get-DbaDbFileGrowth" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbFileGrowth } - 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 } } diff --git a/tests/Get-DbaDbFileMapping.Tests.ps1 b/tests/Get-DbaDbFileMapping.Tests.ps1 index a756709528..5394b34837 100644 --- a/tests/Get-DbaDbFileMapping.Tests.ps1 +++ b/tests/Get-DbaDbFileMapping.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaDbFileMapping" { $CommandUnderTest = Get-Command Get-DbaDbFileMapping } 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 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/Get-DbaDbForeignKey.Tests.ps1 b/tests/Get-DbaDbForeignKey.Tests.ps1 index 8fa914a3ab..740e1afa7b 100644 --- a/tests/Get-DbaDbForeignKey.Tests.ps1 +++ b/tests/Get-DbaDbForeignKey.Tests.ps1 @@ -11,22 +11,22 @@ Describe "Get-DbaDbForeignKey Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbForeignKey } 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 ExcludeDatabase parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have ExcludeSystemTable parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemTable -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemTable -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/Get-DbaDbIdentity.Tests.ps1 b/tests/Get-DbaDbIdentity.Tests.ps1 index c365573f9f..7fae456150 100644 --- a/tests/Get-DbaDbIdentity.Tests.ps1 +++ b/tests/Get-DbaDbIdentity.Tests.ps1 @@ -33,13 +33,13 @@ Describe "Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaDbLogShipError.Tests.ps1 b/tests/Get-DbaDbLogShipError.Tests.ps1 index a919a35eec..334d2cc5d1 100644 --- a/tests/Get-DbaDbLogShipError.Tests.ps1 +++ b/tests/Get-DbaDbLogShipError.Tests.ps1 @@ -10,34 +10,34 @@ Describe "Get-DbaDbLogShipError Unit Tests" -Tag 'UnitTests' { $CommandName = Get-Command Get-DbaDbLogShipError } It "Should have SqlInstance as a parameter" { - $CommandName | Should -HaveParameter SqlInstance -Type DbaInstanceParameter[] -Mandatory:$false + $CommandName | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false } It "Should have SqlCredential as a parameter" { - $CommandName | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false + $CommandName | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Database as a parameter" { - $CommandName | Should -HaveParameter Database -Type String[] -Mandatory:$false + $CommandName | Should -HaveParameter Database -Type System.String[] -Mandatory:$false } It "Should have ExcludeDatabase as a parameter" { - $CommandName | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandName | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have Action as a parameter" { - $CommandName | Should -HaveParameter Action -Type String[] -Mandatory:$false + $CommandName | Should -HaveParameter Action -Type System.String[] -Mandatory:$false } It "Should have DateTimeFrom as a parameter" { - $CommandName | Should -HaveParameter DateTimeFrom -Type DateTime -Mandatory:$false + $CommandName | Should -HaveParameter DateTimeFrom -Type System.DateTime -Mandatory:$false } It "Should have DateTimeTo as a parameter" { - $CommandName | Should -HaveParameter DateTimeTo -Type DateTime -Mandatory:$false + $CommandName | Should -HaveParameter DateTimeTo -Type System.DateTime -Mandatory:$false } It "Should have Primary as a parameter" { - $CommandName | Should -HaveParameter Primary -Type Switch -Mandatory:$false + $CommandName | Should -HaveParameter Primary -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have Secondary as a parameter" { - $CommandName | Should -HaveParameter Secondary -Type Switch -Mandatory:$false + $CommandName | Should -HaveParameter Secondary -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have EnableException as a parameter" { - $CommandName | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandName | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false } } } diff --git a/tests/Get-DbaDbLogSpace.Tests.ps1 b/tests/Get-DbaDbLogSpace.Tests.ps1 index 85d6f413b5..3c0595c5f2 100644 --- a/tests/Get-DbaDbLogSpace.Tests.ps1 +++ b/tests/Get-DbaDbLogSpace.Tests.ps1 @@ -11,17 +11,17 @@ Describe "Get-DbaDbLogSpace" { 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 ExcludeSystemDatabase as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemDatabase -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemDatabase -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/Get-DbaDbMail.Tests.ps1 b/tests/Get-DbaDbMail.Tests.ps1 index b0b20f1aa7..d0ee2c5807 100644 --- a/tests/Get-DbaDbMail.Tests.ps1 +++ b/tests/Get-DbaDbMail.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaDbMail" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbMail } - 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/Get-DbaDbMailAccount.Tests.ps1 b/tests/Get-DbaDbMailAccount.Tests.ps1 index dc5f29b49e..b02a67ed1c 100644 --- a/tests/Get-DbaDbMailAccount.Tests.ps1 +++ b/tests/Get-DbaDbMailAccount.Tests.ps1 @@ -5,19 +5,19 @@ Describe "Get-DbaDbMailAccount" { BeforeAll { $CommandUnderTest = Get-Command Get-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 System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.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 ExcludeAccount as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ExcludeAccount -Type String[] -Mandatory:$false + It "Should have ExcludeAccount as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ExcludeAccount -Type System.String[] -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type SqlMail[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[] -Mandatory:$false } It "Should have EnableException as a non-mandatory switch parameter" { diff --git a/tests/Get-DbaDbMailConfig.Tests.ps1 b/tests/Get-DbaDbMailConfig.Tests.ps1 index c5dbf68b66..1f1cf1b160 100644 --- a/tests/Get-DbaDbMailConfig.Tests.ps1 +++ b/tests/Get-DbaDbMailConfig.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Get-DbaDbMailConfig" { It "Should have SqlCredential as a non-mandatory parameter of type PSCredential" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 InputObject as a non-mandatory parameter of type SqlMail[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[] -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/Get-DbaDbMailHistory.Tests.ps1 b/tests/Get-DbaDbMailHistory.Tests.ps1 index 1a3a367d5e..18000a7b02 100644 --- a/tests/Get-DbaDbMailHistory.Tests.ps1 +++ b/tests/Get-DbaDbMailHistory.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaDbMailHistory" { $CommandUnderTest = Get-Command Get-DbaDbMailHistory } 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 Since as a parameter" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime } It "Should have Status as a parameter" { - $CommandUnderTest | Should -HaveParameter Status -Type String + $CommandUnderTest | Should -HaveParameter Status -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/Get-DbaDbMailLog.Tests.ps1 b/tests/Get-DbaDbMailLog.Tests.ps1 index a5e2dc9f31..cf63c12a75 100644 --- a/tests/Get-DbaDbMailLog.Tests.ps1 +++ b/tests/Get-DbaDbMailLog.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaDbMailLog" { $CommandUnderTest = Get-Command Get-DbaDbMailLog } 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 Since as a parameter" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime } 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 } } diff --git a/tests/Get-DbaDbMailProfile.Tests.ps1 b/tests/Get-DbaDbMailProfile.Tests.ps1 index d28f55844f..4236a351f7 100644 --- a/tests/Get-DbaDbMailProfile.Tests.ps1 +++ b/tests/Get-DbaDbMailProfile.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Get-DbaDbMailProfile Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbMailProfile } 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 Profile as a parameter" { - $CommandUnderTest | Should -HaveParameter Profile -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Profile -Type System.String[] -Mandatory:$false } It "Should have ExcludeProfile as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeProfile -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeProfile -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[] -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/Get-DbaDbMailServer.Tests.ps1 b/tests/Get-DbaDbMailServer.Tests.ps1 index d88c7eedcc..a55770ecba 100644 --- a/tests/Get-DbaDbMailServer.Tests.ps1 +++ b/tests/Get-DbaDbMailServer.Tests.ps1 @@ -5,19 +5,19 @@ Describe "Get-DbaDbMailServer" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbMailServer } - 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 Server as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Server -Type String[] -Mandatory:$false + It "Should have Server as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Server -Type System.String[] -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 InputObject as a non-mandatory parameter of type SqlMail[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Mail.SqlMail[] -Mandatory:$false } It "Should have EnableException as a non-mandatory Switch" { diff --git a/tests/Get-DbaDbMasterKey.Tests.ps1 b/tests/Get-DbaDbMasterKey.Tests.ps1 index 0ef11df104..d221ce0b38 100644 --- a/tests/Get-DbaDbMasterKey.Tests.ps1 +++ b/tests/Get-DbaDbMasterKey.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Get-DbaDbMasterKey Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbMasterKey } 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/Get-DbaDbMemoryUsage.Tests.ps1 b/tests/Get-DbaDbMemoryUsage.Tests.ps1 index b663a8e6c5..3512b3627e 100644 --- a/tests/Get-DbaDbMemoryUsage.Tests.ps1 +++ b/tests/Get-DbaDbMemoryUsage.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbMemoryUsage" { $CommandUnderTest = Get-Command Get-DbaDbMemoryUsage } 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 Microsoft.SqlServer.Management.Smo.Database[] } It "Should have ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] } It "Should have IncludeSystemDb as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDb -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDb -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/Get-DbaDbMirror.Tests.ps1 b/tests/Get-DbaDbMirror.Tests.ps1 index c01005137d..bf23774fe8 100644 --- a/tests/Get-DbaDbMirror.Tests.ps1 +++ b/tests/Get-DbaDbMirror.Tests.ps1 @@ -18,10 +18,10 @@ Describe "Get-DbaDbMirror" { $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 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/Get-DbaDbMirrorMonitor.Tests.ps1 b/tests/Get-DbaDbMirrorMonitor.Tests.ps1 index b9b0b957c5..119804047a 100644 --- a/tests/Get-DbaDbMirrorMonitor.Tests.ps1 +++ b/tests/Get-DbaDbMirrorMonitor.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaDbMirrorMonitor" { $CommandUnderTest = Get-Command Get-DbaDbMirrorMonitor } 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 InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have Update parameter" { - $CommandUnderTest | Should -HaveParameter Update -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Update -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have LimitResults parameter" { - $CommandUnderTest | Should -HaveParameter LimitResults -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter LimitResults -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/Get-DbaDbObjectTrigger.Tests.ps1 b/tests/Get-DbaDbObjectTrigger.Tests.ps1 index 0e9eef6575..a68fcd7714 100644 --- a/tests/Get-DbaDbObjectTrigger.Tests.ps1 +++ b/tests/Get-DbaDbObjectTrigger.Tests.ps1 @@ -18,19 +18,19 @@ Describe "Get-DbaDbObjectTrigger Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 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/Get-DbaDbOrphanUser.Tests.ps1 b/tests/Get-DbaDbOrphanUser.Tests.ps1 index f814c4bf04..46232735a7 100644 --- a/tests/Get-DbaDbOrphanUser.Tests.ps1 +++ b/tests/Get-DbaDbOrphanUser.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaDbOrphanUser" { $CommandUnderTest = Get-Command Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaDbPageInfo.Tests.ps1 b/tests/Get-DbaDbPageInfo.Tests.ps1 index 0ad74c29fb..3e9804d183 100644 --- a/tests/Get-DbaDbPageInfo.Tests.ps1 +++ b/tests/Get-DbaDbPageInfo.Tests.ps1 @@ -5,26 +5,26 @@ Describe "Get-DbaDbPageInfo" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbPageInfo } - 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 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 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 } } diff --git a/tests/Get-DbaDbPartitionFunction.Tests.ps1 b/tests/Get-DbaDbPartitionFunction.Tests.ps1 index ac401e8f5f..b4ad17e496 100644 --- a/tests/Get-DbaDbPartitionFunction.Tests.ps1 +++ b/tests/Get-DbaDbPartitionFunction.Tests.ps1 @@ -11,17 +11,17 @@ Describe "Get-DbaDbPartitionFunction" { 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 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have PartitionFunction as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter PartitionFunction -Type String[] -Mandatory:$false + It "Should have PartitionFunction as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter PartitionFunction -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/Get-DbaDbPartitionScheme.Tests.ps1 b/tests/Get-DbaDbPartitionScheme.Tests.ps1 index bde6eca2ff..a4fba2556c 100644 --- a/tests/Get-DbaDbPartitionScheme.Tests.ps1 +++ b/tests/Get-DbaDbPartitionScheme.Tests.ps1 @@ -5,23 +5,23 @@ Describe "Get-DbaDbPartitionScheme" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbPartitionScheme } - 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have PartitionScheme as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter PartitionScheme -Type String[] -Mandatory:$false + It "Should have PartitionScheme as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter PartitionScheme -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/Get-DbaDbQueryStoreOption.Tests.ps1 b/tests/Get-DbaDbQueryStoreOption.Tests.ps1 index 2a2062bae5..948eae4e1c 100644 --- a/tests/Get-DbaDbQueryStoreOption.Tests.ps1 +++ b/tests/Get-DbaDbQueryStoreOption.Tests.ps1 @@ -10,19 +10,19 @@ Describe "Get-DbaDbQueryStoreOption" { $CommandUnderTest = Get-Command Get-DbaDbQueryStoreOption } 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/Get-DbaDbRecoveryModel.Tests.ps1 b/tests/Get-DbaDbRecoveryModel.Tests.ps1 index 2a9e6c91e3..a843548739 100644 --- a/tests/Get-DbaDbRecoveryModel.Tests.ps1 +++ b/tests/Get-DbaDbRecoveryModel.Tests.ps1 @@ -18,16 +18,16 @@ Describe "Get-DbaDbRecoveryModel" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have RecoveryModel as a parameter" { - $CommandUnderTest | Should -HaveParameter RecoveryModel -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RecoveryModel -Type System.String[] -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 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/Get-DbaDbRestoreHistory.Tests.ps1 b/tests/Get-DbaDbRestoreHistory.Tests.ps1 index 471e31c79f..c69574ad84 100644 --- a/tests/Get-DbaDbRestoreHistory.Tests.ps1 +++ b/tests/Get-DbaDbRestoreHistory.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Get-DbaDbRestoreHistory Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbRestoreHistory } 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 Since as a parameter" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime } It "Should have RestoreType as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreType -Type String + $CommandUnderTest | Should -HaveParameter RestoreType -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 Last as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Last -Type Switch + $CommandUnderTest | Should -HaveParameter Last -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/Get-DbaDbRole.Tests.ps1 b/tests/Get-DbaDbRole.Tests.ps1 index aae2e6c876..76776af09f 100644 --- a/tests/Get-DbaDbRole.Tests.ps1 +++ b/tests/Get-DbaDbRole.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaDbRole" { $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 ExcludeFixedRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type System.Management.Automation.SwitchParameter -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/Get-DbaDbRoleMember.Tests.ps1 b/tests/Get-DbaDbRoleMember.Tests.ps1 index ee794c5a16..639e69644e 100644 --- a/tests/Get-DbaDbRoleMember.Tests.ps1 +++ b/tests/Get-DbaDbRoleMember.Tests.ps1 @@ -6,34 +6,34 @@ Describe "Get-DbaDbRoleMember Unit Tests" -Tag "UnitTests" { $CommandUnderTest = Get-Command Get-DbaDbRoleMember } 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 ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] -Mandatory:$false } It "Should have Role as a parameter" { - $CommandUnderTest | Should -HaveParameter Role -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Role -Type System.String[] -Mandatory:$false } It "Should have ExcludeRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeRole -Type System.String[] -Mandatory:$false } It "Should have ExcludeFixedRole as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have IncludeSystemUser as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemUser -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystemUser -Type System.Management.Automation.Switch -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.Switch -Mandatory:$false } } } diff --git a/tests/Get-DbaDbSchema.Tests.ps1 b/tests/Get-DbaDbSchema.Tests.ps1 index f0966bbfa2..9a3589f8be 100644 --- a/tests/Get-DbaDbSchema.Tests.ps1 +++ b/tests/Get-DbaDbSchema.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Get-DbaDbSchema Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbSchema } 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 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 IncludeSystemDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDatabases -Type System.Management.Automation.SwitchParameter } It "Should have IncludeSystemSchemas as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemSchemas -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemSchemas -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/Get-DbaDbSequence.Tests.ps1 b/tests/Get-DbaDbSequence.Tests.ps1 index bd1aa647cb..e58f8a885d 100644 --- a/tests/Get-DbaDbSequence.Tests.ps1 +++ b/tests/Get-DbaDbSequence.Tests.ps1 @@ -18,13 +18,13 @@ Describe "Get-DbaDbSequence Unit Tests" -Tag 'UnitTests' { $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 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[] diff --git a/tests/Get-DbaDbServiceBrokerQueue.Tests.ps1 b/tests/Get-DbaDbServiceBrokerQueue.Tests.ps1 index bbb2679206..0a57cab619 100644 --- a/tests/Get-DbaDbServiceBrokerQueue.Tests.ps1 +++ b/tests/Get-DbaDbServiceBrokerQueue.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbServiceBrokerQueue" { $CommandUnderTest = Get-Command Get-DbaDbServiceBrokerQueue } 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 ExcludeSystemQueue as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemQueue -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemQueue -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/Get-DbaDbServiceBrokerService.Tests.ps1 b/tests/Get-DbaDbServiceBrokerService.Tests.ps1 index 281c750b8f..1d121e3f85 100644 --- a/tests/Get-DbaDbServiceBrokerService.Tests.ps1 +++ b/tests/Get-DbaDbServiceBrokerService.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbServiceBrokerService" { $CommandUnderTest = Get-Command Get-DbaDbServiceBrokerService } 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 ExcludeSystemService as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemService -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemService -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/Get-DbaDbSnapshot.Tests.ps1 b/tests/Get-DbaDbSnapshot.Tests.ps1 index 9db95eb552..392d0b1ec8 100644 --- a/tests/Get-DbaDbSnapshot.Tests.ps1 +++ b/tests/Get-DbaDbSnapshot.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaDbSnapshot Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-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 Microsoft.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 ExcludeSnapshot as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSnapshot -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeSnapshot -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/Get-DbaDbSpace.Tests.ps1 b/tests/Get-DbaDbSpace.Tests.ps1 index 701b5d0bb3..8a25b64166 100644 --- a/tests/Get-DbaDbSpace.Tests.ps1 +++ b/tests/Get-DbaDbSpace.Tests.ps1 @@ -10,26 +10,26 @@ Describe "Get-DbaDbSpace" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbSpace } - 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 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 IncludeSystemDBs as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type System.Management.Automation.SwitchParameter -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 } } diff --git a/tests/Get-DbaDbState.Tests.ps1 b/tests/Get-DbaDbState.Tests.ps1 index 971be4ca04..c08813b355 100644 --- a/tests/Get-DbaDbState.Tests.ps1 +++ b/tests/Get-DbaDbState.Tests.ps1 @@ -10,19 +10,19 @@ Describe "Get-DbaDbState" { $CommandUnderTest = Get-Command Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaDbStoredProcedure.Tests.ps1 b/tests/Get-DbaDbStoredProcedure.Tests.ps1 index 45f3310e2f..4d36449016 100644 --- a/tests/Get-DbaDbStoredProcedure.Tests.ps1 +++ b/tests/Get-DbaDbStoredProcedure.Tests.ps1 @@ -11,32 +11,32 @@ Describe "Get-DbaDbStoredProcedure Unit Tests" -Tag 'UnitTests' { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbStoredProcedure } - 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have ExcludeSystemSp as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemSp -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemSp -Type System.Management.Automation.Switch -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 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 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 } } } diff --git a/tests/Get-DbaDbSynonym.Tests.ps1 b/tests/Get-DbaDbSynonym.Tests.ps1 index ce72123f97..64c1d98ece 100644 --- a/tests/Get-DbaDbSynonym.Tests.ps1 +++ b/tests/Get-DbaDbSynonym.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaDbSynonym Unit Tests" -Tag "UnitTests" { $CommandUnderTest = Get-Command Get-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 Microsoft.SqlServer.Management.Smo.Credential } It "Should have Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have ExcludeDatabase as a parameter" { $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] @@ -33,7 +33,7 @@ Describe "Get-DbaDbSynonym Unit Tests" -Tag "UnitTests" { $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/Get-DbaDbTable.Tests.ps1 b/tests/Get-DbaDbTable.Tests.ps1 index bf1761f5b5..d5cc35be1d 100644 --- a/tests/Get-DbaDbTable.Tests.ps1 +++ b/tests/Get-DbaDbTable.Tests.ps1 @@ -28,25 +28,25 @@ Describe "Get-DbaDbTable" { $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 IncludeSystemDBs as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type System.Management.Automation.SwitchParameter } It "Should have Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] + $CommandUnderTest | Should -HaveParameter Table -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/Get-DbaDbTrigger.Tests.ps1 b/tests/Get-DbaDbTrigger.Tests.ps1 index cc1f700aa7..9bd01a1e7d 100644 --- a/tests/Get-DbaDbTrigger.Tests.ps1 +++ b/tests/Get-DbaDbTrigger.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbTrigger Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbTrigger } 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 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/Get-DbaDbUdf.Tests.ps1 b/tests/Get-DbaDbUdf.Tests.ps1 index a8d833fde4..9c0c9b6c29 100644 --- a/tests/Get-DbaDbUdf.Tests.ps1 +++ b/tests/Get-DbaDbUdf.Tests.ps1 @@ -12,34 +12,34 @@ Describe "Get-DbaDbUdf Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbUdf } 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 ExcludeSystemUdf as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemUdf -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemUdf -Type System.Management.Automation.SwitchParameter } 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 Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String[] + $CommandUnderTest | Should -HaveParameter Name -Type System.String[] } It "Should have ExcludeName as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeName -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeName -Type System.String[] } 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/Get-DbaDbUser.Tests.ps1 b/tests/Get-DbaDbUser.Tests.ps1 index 1b25c217f9..38bd92252e 100644 --- a/tests/Get-DbaDbUser.Tests.ps1 +++ b/tests/Get-DbaDbUser.Tests.ps1 @@ -18,22 +18,22 @@ Describe "Get-DbaDbUser Unit Tests" -Tag 'UnitTests' { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 ExcludeSystemUser as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemUser -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemUser -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[] } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -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/Get-DbaDbUserDefinedTableType.Tests.ps1 b/tests/Get-DbaDbUserDefinedTableType.Tests.ps1 index beca1ea051..f9ec39ea89 100644 --- a/tests/Get-DbaDbUserDefinedTableType.Tests.ps1 +++ b/tests/Get-DbaDbUserDefinedTableType.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaDbUserDefinedTableType" { $CommandUnderTest = Get-Command Get-DbaDbUserDefinedTableType } 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 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 } } diff --git a/tests/Get-DbaDbView.Tests.ps1 b/tests/Get-DbaDbView.Tests.ps1 index a4c03900ca..69edd8efd8 100644 --- a/tests/Get-DbaDbView.Tests.ps1 +++ b/tests/Get-DbaDbView.Tests.ps1 @@ -12,38 +12,38 @@ Describe "Get-DbaDbView Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbView } 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 ExcludeSystemView as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemView -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemView -Type System.Management.Automation.SwitchParameter } It "Should have View as a parameter" { - $CommandUnderTest | Should -HaveParameter View -Type String[] + $CommandUnderTest | Should -HaveParameter View -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 switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } Describe "Get-DbaDbView Integration Tests" -Tag "IntegrationTests" { BeforeDiscovery { - $SkipAzureTests = [Environment]::GetEnvironmentVariable('azuredbpasswd') -ne "failstooften" + $SkipAzureTests = [Environment]::GetEnvironmentVariable('azuredbpasswd') -ne "failstoooften" } BeforeAll { diff --git a/tests/Get-DbaDbVirtualLogFile.Tests.ps1 b/tests/Get-DbaDbVirtualLogFile.Tests.ps1 index 212999719d..b1a3ca88bc 100644 --- a/tests/Get-DbaDbVirtualLogFile.Tests.ps1 +++ b/tests/Get-DbaDbVirtualLogFile.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Get-DbaDbVirtualLogFile Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDbVirtualLogFile } 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 IncludeSystemDBs as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -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/Get-DbaDbccHelp.Tests.ps1 b/tests/Get-DbaDbccHelp.Tests.ps1 index 31426d4fe9..b92ef4474d 100644 --- a/tests/Get-DbaDbccHelp.Tests.ps1 +++ b/tests/Get-DbaDbccHelp.Tests.ps1 @@ -5,20 +5,20 @@ Describe "Get-DbaDbccHelp" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbccHelp } - 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 Statement as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Statement -Type String -Mandatory:$false + It "Should have Statement as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Statement -Type System.String -Mandatory:$false } It "Should have IncludeUndocumented as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeUndocumented -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeUndocumented -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/Get-DbaDbccMemoryStatus.Tests.ps1 b/tests/Get-DbaDbccMemoryStatus.Tests.ps1 index 20650d43cd..f4639099c7 100644 --- a/tests/Get-DbaDbccMemoryStatus.Tests.ps1 +++ b/tests/Get-DbaDbccMemoryStatus.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaDbccMemoryStatus" { $CommandUnderTest = Get-Command Get-DbaDbccMemoryStatus } 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/Get-DbaDbccProcCache.Tests.ps1 b/tests/Get-DbaDbccProcCache.Tests.ps1 index 35dddc14e1..f435d4ad21 100644 --- a/tests/Get-DbaDbccProcCache.Tests.ps1 +++ b/tests/Get-DbaDbccProcCache.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaDbccProcCache" { $CommandUnderTest = Get-Command Get-DbaDbccProcCache } 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/Get-DbaDbccSessionBuffer.Tests.ps1 b/tests/Get-DbaDbccSessionBuffer.Tests.ps1 index 4d2f3fedf7..ee69d109dc 100644 --- a/tests/Get-DbaDbccSessionBuffer.Tests.ps1 +++ b/tests/Get-DbaDbccSessionBuffer.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Get-DbaDbccSessionBuffer" { $CommandUnderTest = Get-Command Get-DbaDbccSessionBuffer } 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 Operation parameter" { - $CommandUnderTest | Should -HaveParameter Operation -Type String + $CommandUnderTest | Should -HaveParameter Operation -Type System.String } It "Should have SessionId parameter" { - $CommandUnderTest | Should -HaveParameter SessionId -Type Int32[] + $CommandUnderTest | Should -HaveParameter SessionId -Type System.Int32[] } It "Should have RequestId parameter" { - $CommandUnderTest | Should -HaveParameter RequestId -Type Int32 + $CommandUnderTest | Should -HaveParameter RequestId -Type System.Int32 } It "Should have All parameter" { - $CommandUnderTest | Should -HaveParameter All -Type Switch + $CommandUnderTest | Should -HaveParameter All -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/Get-DbaDbccStatistic.Tests.ps1 b/tests/Get-DbaDbccStatistic.Tests.ps1 index 9a64e5bd7e..f42585b6e8 100644 --- a/tests/Get-DbaDbccStatistic.Tests.ps1 +++ b/tests/Get-DbaDbccStatistic.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Get-DbaDbccStatistic" { $CommandUnderTest = Get-Command Get-DbaDbccStatistic } 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 Object parameter" { - $CommandUnderTest | Should -HaveParameter Object -Type String + $CommandUnderTest | Should -HaveParameter Object -Type System.String } It "Should have Target parameter" { - $CommandUnderTest | Should -HaveParameter Target -Type String + $CommandUnderTest | Should -HaveParameter Target -Type System.String } It "Should have Option parameter" { - $CommandUnderTest | Should -HaveParameter Option -Type String + $CommandUnderTest | Should -HaveParameter Option -Type System.String } It "Should have NoInformationalMessages parameter" { - $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type Switch + $CommandUnderTest | Should -HaveParameter NoInformationalMessages -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/Get-DbaDbccUserOption.Tests.ps1 b/tests/Get-DbaDbccUserOption.Tests.ps1 index 7b0bccd44a..0387efe19a 100644 --- a/tests/Get-DbaDbccUserOption.Tests.ps1 +++ b/tests/Get-DbaDbccUserOption.Tests.ps1 @@ -9,17 +9,17 @@ Describe "Get-DbaDbccUserOption" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDbccUserOption } - 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 Option as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Option -Type String[] -Mandatory:$false + It "Should have Option as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Option -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/Get-DbaDefaultPath.Tests.ps1 b/tests/Get-DbaDefaultPath.Tests.ps1 index eede78af41..8fff2a23ff 100644 --- a/tests/Get-DbaDefaultPath.Tests.ps1 +++ b/tests/Get-DbaDefaultPath.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaDefaultPath" { $CommandUnderTest = Get-Command Get-DbaDefaultPath } 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/Get-DbaDependency.Tests.ps1 b/tests/Get-DbaDependency.Tests.ps1 index fd7ebd38ea..4ffbba88d7 100644 --- a/tests/Get-DbaDependency.Tests.ps1 +++ b/tests/Get-DbaDependency.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaDependency Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaDependency } 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 AllowSystemObjects as a parameter" { - $CommandUnderTest | Should -HaveParameter AllowSystemObjects -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllowSystemObjects -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Parents as a parameter" { - $CommandUnderTest | Should -HaveParameter Parents -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Parents -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have IncludeSelf as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSelf -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSelf -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/Get-DbaDeprecatedFeature.Tests.ps1 b/tests/Get-DbaDeprecatedFeature.Tests.ps1 index 0bd230a985..7f0f333f50 100644 --- a/tests/Get-DbaDeprecatedFeature.Tests.ps1 +++ b/tests/Get-DbaDeprecatedFeature.Tests.ps1 @@ -9,14 +9,14 @@ Describe "Get-DbaDeprecatedFeature" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaDeprecatedFeature } - 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/Get-DbaDiskSpace.Tests.ps1 b/tests/Get-DbaDiskSpace.Tests.ps1 index b3abd96b70..f51bae1a08 100644 --- a/tests/Get-DbaDiskSpace.Tests.ps1 +++ b/tests/Get-DbaDiskSpace.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Get-DbaDiskSpace" { $CommandUnderTest = Get-Command Get-DbaDiskSpace } 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 Microsoft.SqlServer.Management.Smo.PSCredential } It "Should have Unit as a parameter" { - $CommandUnderTest | Should -HaveParameter Unit -Type String + $CommandUnderTest | Should -HaveParameter Unit -Type System.String } 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 ExcludeDrive as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDrive -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDrive -Type System.String[] } It "Should have CheckFragmentation as a switch parameter" { - $CommandUnderTest | Should -HaveParameter CheckFragmentation -Type Switch + $CommandUnderTest | Should -HaveParameter CheckFragmentation -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/Get-DbaDump.Tests.ps1 b/tests/Get-DbaDump.Tests.ps1 index 7b519b58c3..c753e2e86a 100644 --- a/tests/Get-DbaDump.Tests.ps1 +++ b/tests/Get-DbaDump.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaDump" { $CommandUnderTest = Get-Command Get-DbaDump } 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/Get-DbaEndpoint.Tests.ps1 b/tests/Get-DbaEndpoint.Tests.ps1 index 7cb8294cdd..5774ec2196 100644 --- a/tests/Get-DbaEndpoint.Tests.ps1 +++ b/tests/Get-DbaEndpoint.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaEndpoint" { $CommandUnderTest = Get-Command Get-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 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 } } diff --git a/tests/Get-DbaErrorLog.Tests.ps1 b/tests/Get-DbaErrorLog.Tests.ps1 index bd03b82715..bb38092451 100644 --- a/tests/Get-DbaErrorLog.Tests.ps1 +++ b/tests/Get-DbaErrorLog.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Get-DbaErrorLog" { $CommandUnderTest = Get-Command Get-DbaErrorLog } 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 LogNumber as a parameter" { - $CommandUnderTest | Should -HaveParameter LogNumber -Type Int32[] + $CommandUnderTest | Should -HaveParameter LogNumber -Type System.Int32[] } It "Should have Source as a parameter" { - $CommandUnderTest | Should -HaveParameter Source -Type Object[] + $CommandUnderTest | Should -HaveParameter Source -Type System.Object[] } It "Should have Text as a parameter" { - $CommandUnderTest | Should -HaveParameter Text -Type String + $CommandUnderTest | Should -HaveParameter Text -Type System.String } It "Should have After as a parameter" { - $CommandUnderTest | Should -HaveParameter After -Type DateTime + $CommandUnderTest | Should -HaveParameter After -Type System.DateTime } It "Should have Before as a parameter" { - $CommandUnderTest | Should -HaveParameter Before -Type DateTime + $CommandUnderTest | Should -HaveParameter Before -Type System.DateTime } 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/Get-DbaErrorLogConfig.Tests.ps1 b/tests/Get-DbaErrorLogConfig.Tests.ps1 index 242c62a509..0d6531059e 100644 --- a/tests/Get-DbaErrorLogConfig.Tests.ps1 +++ b/tests/Get-DbaErrorLogConfig.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaErrorLogConfig" { $CommandUnderTest = Get-Command Get-DbaErrorLogConfig } 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/Get-DbaEstimatedCompletionTime.Tests.ps1 b/tests/Get-DbaEstimatedCompletionTime.Tests.ps1 index d807006367..685917f17c 100644 --- a/tests/Get-DbaEstimatedCompletionTime.Tests.ps1 +++ b/tests/Get-DbaEstimatedCompletionTime.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaEstimatedCompletionTime" { $CommandUnderTest = Get-Command Get-DbaEstimatedCompletionTime } 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 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/Get-DbaExecutionPlan.Tests.ps1 b/tests/Get-DbaExecutionPlan.Tests.ps1 index 4ac3add27c..b7032b6e53 100644 --- a/tests/Get-DbaExecutionPlan.Tests.ps1 +++ b/tests/Get-DbaExecutionPlan.Tests.ps1 @@ -6,31 +6,31 @@ Describe "Get-DbaExecutionPlan" { $CommandUnderTest = Get-Command Get-DbaExecutionPlan } 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 SinceCreation as a parameter" { - $CommandUnderTest | Should -HaveParameter SinceCreation -Type DateTime + $CommandUnderTest | Should -HaveParameter SinceCreation -Type System.DateTime } It "Should have SinceLastExecution as a parameter" { - $CommandUnderTest | Should -HaveParameter SinceLastExecution -Type DateTime + $CommandUnderTest | Should -HaveParameter SinceLastExecution -Type System.DateTime } It "Should have ExcludeEmptyQueryPlan as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeEmptyQueryPlan -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeEmptyQueryPlan -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/Get-DbaExtendedProperty.Tests.ps1 b/tests/Get-DbaExtendedProperty.Tests.ps1 index f327ed61cb..79b93b8ef1 100644 --- a/tests/Get-DbaExtendedProperty.Tests.ps1 +++ b/tests/Get-DbaExtendedProperty.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Get-DbaExtendedProperty" { $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 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 PSObject[] } 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/Get-DbaExtendedProtection.Tests.ps1 b/tests/Get-DbaExtendedProtection.Tests.ps1 index 538dc1ec64..fa360cdf2b 100644 --- a/tests/Get-DbaExtendedProtection.Tests.ps1 +++ b/tests/Get-DbaExtendedProtection.Tests.ps1 @@ -10,19 +10,19 @@ Describe "Get-DbaExtendedProtection" { $CommandUnderTest = Get-Command Get-DbaExtendedProtection } 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/Get-DbaExternalProcess.Tests.ps1 b/tests/Get-DbaExternalProcess.Tests.ps1 index 11301c3a2e..cb62e484c8 100644 --- a/tests/Get-DbaExternalProcess.Tests.ps1 +++ b/tests/Get-DbaExternalProcess.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaExternalProcess" { $CommandUnderTest = Get-Command Get-DbaExternalProcess } It "Accepts ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter ComputerName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } 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 } } diff --git a/tests/Get-DbaFeature.Tests.ps1 b/tests/Get-DbaFeature.Tests.ps1 index e27d35a502..473134dd4a 100644 --- a/tests/Get-DbaFeature.Tests.ps1 +++ b/tests/Get-DbaFeature.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaFeature" { $CommandUnderTest = Get-Command Get-DbaFeature } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaFile.Tests.ps1 b/tests/Get-DbaFile.Tests.ps1 index 734571cd47..2f82bc6c1b 100644 --- a/tests/Get-DbaFile.Tests.ps1 +++ b/tests/Get-DbaFile.Tests.ps1 @@ -5,23 +5,23 @@ Describe "Get-DbaFile" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaFile } - 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 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 FileType as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter FileType -Type String[] -Mandatory:$false + It "Should have FileType as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter FileType -Type System.String[] -Mandatory:$false } - It "Should have Depth as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Depth -Type Int32 -Mandatory:$false + It "Should have Depth as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Depth -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/Get-DbaFilestream.Tests.ps1 b/tests/Get-DbaFilestream.Tests.ps1 index 4a79abb7c6..4b3e68fb59 100644 --- a/tests/Get-DbaFilestream.Tests.ps1 +++ b/tests/Get-DbaFilestream.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Get-DbaFilestream" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaFilestream } - 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 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 diff --git a/tests/Get-DbaFirewallRule.Tests.ps1 b/tests/Get-DbaFirewallRule.Tests.ps1 index 9d774143a4..249171a12b 100644 --- a/tests/Get-DbaFirewallRule.Tests.ps1 +++ b/tests/Get-DbaFirewallRule.Tests.ps1 @@ -10,16 +10,16 @@ Describe "Get-DbaFirewallRule" { $CommandUnderTest = Get-Command Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaForceNetworkEncryption.Tests.ps1 b/tests/Get-DbaForceNetworkEncryption.Tests.ps1 index d64e26fe01..2f535aa8d6 100644 --- a/tests/Get-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Get-DbaForceNetworkEncryption.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaForceNetworkEncryption" { $CommandUnderTest = Get-Command Get-DbaForceNetworkEncryption } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaHelpIndex.Tests.ps1 b/tests/Get-DbaHelpIndex.Tests.ps1 index 760b062dd2..d1dc126f5e 100644 --- a/tests/Get-DbaHelpIndex.Tests.ps1 +++ b/tests/Get-DbaHelpIndex.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Get-DbaHelpIndex Unit Tests" -Tag 'UnitTests' { $CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" - Write-Host -Object "${script:instance2}" -ForegroundColor Cyan + Write-host -Object "${script:instance2}" -ForegroundColor Cyan } Context "Validate parameters" { @@ -13,37 +13,37 @@ Describe "Get-DbaHelpIndex Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaHelpIndex } 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 Microsoft.SqlServer.Management.Smo.Database[] } It "Should have ObjectName as a parameter" { - $CommandUnderTest | Should -HaveParameter ObjectName -Type String + $CommandUnderTest | Should -HaveParameter ObjectName -Type System.String } It "Should have IncludeStats as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeStats -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeStats -Type System.Management.Automation.SwitchParameter } It "Should have IncludeDataTypes as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeDataTypes -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeDataTypes -Type System.Management.Automation.SwitchParameter } It "Should have Raw as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch + $CommandUnderTest | Should -HaveParameter Raw -Type System.Management.Automation.SwitchParameter } It "Should have IncludeFragmentation as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeFragmentation -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeFragmentation -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/Get-DbaHideInstance.Tests.ps1 b/tests/Get-DbaHideInstance.Tests.ps1 index 459cf3f2c2..c5508b09d4 100644 --- a/tests/Get-DbaHideInstance.Tests.ps1 +++ b/tests/Get-DbaHideInstance.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Get-DbaHideInstance" { $CommandUnderTest = Get-Command Get-DbaHideInstance } 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 } } diff --git a/tests/Get-DbaInstalledPatch.Tests.ps1 b/tests/Get-DbaInstalledPatch.Tests.ps1 index 6fa402dc4c..9a283fb185 100644 --- a/tests/Get-DbaInstalledPatch.Tests.ps1 +++ b/tests/Get-DbaInstalledPatch.Tests.ps1 @@ -9,11 +9,11 @@ Describe "Get-DbaInstalledPatch" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaInstalledPatch } - 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 diff --git a/tests/Get-DbaInstanceAudit.Tests.ps1 b/tests/Get-DbaInstanceAudit.Tests.ps1 index 831c53f749..a8cfdbcc1f 100644 --- a/tests/Get-DbaInstanceAudit.Tests.ps1 +++ b/tests/Get-DbaInstanceAudit.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaInstanceAudit" { $CommandUnderTest = Get-Command Get-DbaInstanceAudit } 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 Audit as a parameter" { - $CommandUnderTest | Should -HaveParameter Audit -Type String[] + $CommandUnderTest | Should -HaveParameter Audit -Type System.String[] } It "Should have ExcludeAudit as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeAudit -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeAudit -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/Get-DbaInstanceAuditSpecification.Tests.ps1 b/tests/Get-DbaInstanceAuditSpecification.Tests.ps1 index 3cb0856ad4..fbf9bc32be 100644 --- a/tests/Get-DbaInstanceAuditSpecification.Tests.ps1 +++ b/tests/Get-DbaInstanceAuditSpecification.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaInstanceAuditSpecification" { $CommandUnderTest = Get-Command Get-DbaInstanceAuditSpecification } 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/Get-DbaInstanceInstallDate.Tests.ps1 b/tests/Get-DbaInstanceInstallDate.Tests.ps1 index e3726c9f65..3a6cb0072c 100644 --- a/tests/Get-DbaInstanceInstallDate.Tests.ps1 +++ b/tests/Get-DbaInstanceInstallDate.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaInstanceInstallDate" { $CommandUnderTest = Get-Command Get-DbaInstanceInstallDate } 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 IncludeWindows as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeWindows -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeWindows -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/Get-DbaInstanceProperty.Tests.ps1 b/tests/Get-DbaInstanceProperty.Tests.ps1 index 22e0055ada..1f62b1e54f 100644 --- a/tests/Get-DbaInstanceProperty.Tests.ps1 +++ b/tests/Get-DbaInstanceProperty.Tests.ps1 @@ -10,20 +10,20 @@ Describe "Get-DbaInstanceProperty" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaInstanceProperty } - 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 InstanceProperty as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter InstanceProperty -Type Object[] -Mandatory:$false + It "Should have InstanceProperty as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter InstanceProperty -Type System.Object[] -Mandatory:$false } - It "Should have ExcludeInstanceProperty as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeInstanceProperty -Type Object[] -Mandatory:$false + It "Should have ExcludeInstanceProperty as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeInstanceProperty -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/Get-DbaInstanceProtocol.Tests.ps1 b/tests/Get-DbaInstanceProtocol.Tests.ps1 index afd22729ea..b1dc8a0a57 100644 --- a/tests/Get-DbaInstanceProtocol.Tests.ps1 +++ b/tests/Get-DbaInstanceProtocol.Tests.ps1 @@ -9,14 +9,14 @@ Describe "Get-DbaInstanceProtocol" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaInstanceProtocol } - 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/Get-DbaInstanceTrigger.Tests.ps1 b/tests/Get-DbaInstanceTrigger.Tests.ps1 index 12273f1b2c..bf09bd003c 100644 --- a/tests/Get-DbaInstanceTrigger.Tests.ps1 +++ b/tests/Get-DbaInstanceTrigger.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaInstanceTrigger Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaInstanceTrigger } 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/Get-DbaInstanceUserOption.Tests.ps1 b/tests/Get-DbaInstanceUserOption.Tests.ps1 index 253f6c7bac..1d1ef0eeb7 100644 --- a/tests/Get-DbaInstanceUserOption.Tests.ps1 +++ b/tests/Get-DbaInstanceUserOption.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Get-DbaInstanceUserOption" { $CommandUnderTest = Get-Command Get-DbaInstanceUserOption } 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/Get-DbaIoLatency.Tests.ps1 b/tests/Get-DbaIoLatency.Tests.ps1 index ced3c60eed..48c613fc61 100644 --- a/tests/Get-DbaIoLatency.Tests.ps1 +++ b/tests/Get-DbaIoLatency.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaIoLatency" { $CommandUnderTest = Get-Command Get-DbaIoLatency } 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/Get-DbaKbUpdate.Tests.ps1 b/tests/Get-DbaKbUpdate.Tests.ps1 index 9ae6fe1f16..bcb970317c 100644 --- a/tests/Get-DbaKbUpdate.Tests.ps1 +++ b/tests/Get-DbaKbUpdate.Tests.ps1 @@ -10,17 +10,17 @@ Describe "Get-DbaKbUpdate" { BeforeAll { $CommandUnderTest = Get-Command Get-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 Simple as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Simple -Type Switch -Mandatory:$false + It "Should have Simple as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Simple -Type System.Management.Automation.SwitchParameter -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 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/Get-DbaLastBackup.Tests.ps1 b/tests/Get-DbaLastBackup.Tests.ps1 index 4e7fa4611a..b4494b665f 100644 --- a/tests/Get-DbaLastBackup.Tests.ps1 +++ b/tests/Get-DbaLastBackup.Tests.ps1 @@ -12,26 +12,26 @@ Describe "Get-DbaLastBackup Unit Tests" -Tag 'UnitTests' { $Command = Get-Command Get-DbaLastBackup } 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 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 EnableException parameter" { - $Command | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $Command | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } Describe "Get-DbaLastBackup Integration Tests" -Tag "IntegrationTests" { BeforeDiscovery { - $SkipAzureTest = [Environment]::GetEnvironmentVariable('azuredbpasswd') -ne "failstooften" + $SkipAzureTest = [Environment]::GetEnvironmentVariable('azuredbpasswd') -ne "failstoooften" } BeforeAll { diff --git a/tests/Get-DbaLastGoodCheckDb.Tests.ps1 b/tests/Get-DbaLastGoodCheckDb.Tests.ps1 index de09bda450..579c13b032 100644 --- a/tests/Get-DbaLastGoodCheckDb.Tests.ps1 +++ b/tests/Get-DbaLastGoodCheckDb.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaLastGoodCheckDb" { $CommandUnderTest = Get-Command Get-DbaLastGoodCheckDb } 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 switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaLatchStatistic.Tests.ps1 b/tests/Get-DbaLatchStatistic.Tests.ps1 index 6ffd20c140..6d4ef3b89a 100644 --- a/tests/Get-DbaLatchStatistic.Tests.ps1 +++ b/tests/Get-DbaLatchStatistic.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Get-DbaLatchStatistic" { $CommandUnderTest = Get-Command Get-DbaLatchStatistic } 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 Threshold as a parameter" { - $CommandUnderTest | Should -HaveParameter Threshold -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Threshold -Type System.Int32 -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/Get-DbaLinkedServer.Tests.ps1 b/tests/Get-DbaLinkedServer.Tests.ps1 index 6e32c4d71a..4f2e5ae347 100644 --- a/tests/Get-DbaLinkedServer.Tests.ps1 +++ b/tests/Get-DbaLinkedServer.Tests.ps1 @@ -11,20 +11,20 @@ Describe "Get-DbaLinkedServer" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaLinkedServer } - 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 LinkedServer as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter LinkedServer -Type Object[] -Mandatory:$false + It "Should have LinkedServer as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter LinkedServer -Type System.Object[] -Mandatory:$false } - It "Should have ExcludeLinkedServer as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeLinkedServer -Type Object[] -Mandatory:$false + It "Should have ExcludeLinkedServer as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeLinkedServer -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/Get-DbaLinkedServerLogin.Tests.ps1 b/tests/Get-DbaLinkedServerLogin.Tests.ps1 index b044b564ff..06352d56e7 100644 --- a/tests/Get-DbaLinkedServerLogin.Tests.ps1 +++ b/tests/Get-DbaLinkedServerLogin.Tests.ps1 @@ -63,22 +63,22 @@ Describe "Get-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 ExcludeLocalLogin as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeLocalLogin -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeLocalLogin -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/Get-DbaLocaleSetting.Tests.ps1 b/tests/Get-DbaLocaleSetting.Tests.ps1 index 43de47c741..05a3757054 100644 --- a/tests/Get-DbaLocaleSetting.Tests.ps1 +++ b/tests/Get-DbaLocaleSetting.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Get-DbaLocaleSetting" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaLocaleSetting } - It "Should have ComputerName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type String[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.String[] -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/Get-DbaLogin.Tests.ps1 b/tests/Get-DbaLogin.Tests.ps1 index 9563c60c94..579231e6c5 100644 --- a/tests/Get-DbaLogin.Tests.ps1 +++ b/tests/Get-DbaLogin.Tests.ps1 @@ -27,40 +27,40 @@ Describe "Get-DbaLogin" { $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 IncludeFilter parameter" { - $CommandUnderTest | Should -HaveParameter IncludeFilter -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeFilter -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 ExcludeFilter parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFilter -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeFilter -Type System.String[] -Mandatory:$false } It "Should have ExcludeSystemLogin parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemLogin -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemLogin -Type System.Management.Automation.SwitchParameter -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 HasAccess parameter" { - $CommandUnderTest | Should -HaveParameter HasAccess -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter HasAccess -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Locked parameter" { - $CommandUnderTest | Should -HaveParameter Locked -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Locked -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Disabled parameter" { - $CommandUnderTest | Should -HaveParameter Disabled -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have MustChangePassword parameter" { - $CommandUnderTest | Should -HaveParameter MustChangePassword -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MustChangePassword -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Detailed parameter" { - $CommandUnderTest | Should -HaveParameter Detailed -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Detailed -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/Get-DbaMaintenanceSolutionLog.Tests.ps1 b/tests/Get-DbaMaintenanceSolutionLog.Tests.ps1 index 23e1dab5a5..1e80b6445e 100644 --- a/tests/Get-DbaMaintenanceSolutionLog.Tests.ps1 +++ b/tests/Get-DbaMaintenanceSolutionLog.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Get-DbaMaintenanceSolutionLog" { $CommandUnderTest = Get-Command Get-DbaMaintenanceSolutionLog } 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 LogType as a parameter" { - $CommandUnderTest | Should -HaveParameter LogType -Type String[] + $CommandUnderTest | Should -HaveParameter LogType -Type System.String[] } It "Should have Since as a parameter" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -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/Get-DbaManagementObject.Tests.ps1 b/tests/Get-DbaManagementObject.Tests.ps1 index de25b31219..f980b73703 100644 --- a/tests/Get-DbaManagementObject.Tests.ps1 +++ b/tests/Get-DbaManagementObject.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Get-DbaManagementObject" { $CommandUnderTest = Get-Command Get-DbaManagementObject } 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 VersionNumber as a parameter" { - $CommandUnderTest | Should -HaveParameter VersionNumber -Type Int32 + $CommandUnderTest | Should -HaveParameter VersionNumber -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/Get-DbaMaxMemory.Tests.ps1 b/tests/Get-DbaMaxMemory.Tests.ps1 index 2c94700f2f..b863bda6e4 100644 --- a/tests/Get-DbaMaxMemory.Tests.ps1 +++ b/tests/Get-DbaMaxMemory.Tests.ps1 @@ -11,13 +11,13 @@ Describe "Get-DbaMaxMemory" { $CommandUnderTest = Get-Command Get-DbaMaxMemory } 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/Get-DbaMemoryCondition.Tests.ps1 b/tests/Get-DbaMemoryCondition.Tests.ps1 index eae43f0b5d..e5a2f84888 100644 --- a/tests/Get-DbaMemoryCondition.Tests.ps1 +++ b/tests/Get-DbaMemoryCondition.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaMemoryCondition" { $CommandUnderTest = Get-Command Get-DbaMemoryCondition } 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/Get-DbaMemoryUsage.Tests.ps1 b/tests/Get-DbaMemoryUsage.Tests.ps1 index 76a83e58f4..55e5030548 100644 --- a/tests/Get-DbaMemoryUsage.Tests.ps1 +++ b/tests/Get-DbaMemoryUsage.Tests.ps1 @@ -11,28 +11,28 @@ Describe "Get-DbaMemoryUsage" { $CommandUnderTest = Get-Command Get-DbaMemoryUsage } 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 Microsoft.Management.Automation.PSCredential } It "Should have MemoryCounterRegex as a parameter" { - $CommandUnderTest | Should -HaveParameter MemoryCounterRegex -Type String + $CommandUnderTest | Should -HaveParameter MemoryCounterRegex -Type System.String } It "Should have PlanCounterRegex as a parameter" { - $CommandUnderTest | Should -HaveParameter PlanCounterRegex -Type String + $CommandUnderTest | Should -HaveParameter PlanCounterRegex -Type System.String } It "Should have BufferCounterRegex as a parameter" { - $CommandUnderTest | Should -HaveParameter BufferCounterRegex -Type String + $CommandUnderTest | Should -HaveParameter BufferCounterRegex -Type System.String } It "Should have SSASCounterRegex as a parameter" { - $CommandUnderTest | Should -HaveParameter SSASCounterRegex -Type String + $CommandUnderTest | Should -HaveParameter SSASCounterRegex -Type System.String } It "Should have SSISCounterRegex as a parameter" { - $CommandUnderTest | Should -HaveParameter SSISCounterRegex -Type String + $CommandUnderTest | Should -HaveParameter SSISCounterRegex -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/Get-DbaModule.Tests.ps1 b/tests/Get-DbaModule.Tests.ps1 index 9e15672a8d..de81e45716 100644 --- a/tests/Get-DbaModule.Tests.ps1 +++ b/tests/Get-DbaModule.Tests.ps1 @@ -11,35 +11,35 @@ Describe "Get-DbaModule" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaModule } - 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 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have ModifiedSince as a non-mandatory parameter of type DateTime" { - $CommandUnderTest | Should -HaveParameter ModifiedSince -Type DateTime -Mandatory:$false + It "Should have ModifiedSince as a non-mandatory parameter of type System.DateTime" { + $CommandUnderTest | Should -HaveParameter ModifiedSince -Type System.DateTime -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 ExcludeSystemDatabases as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExcludeSystemObjects as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemObjects -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemObjects -Type System.Management.Automation.SwitchParameter -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 } } diff --git a/tests/Get-DbaMsdtc.Tests.ps1 b/tests/Get-DbaMsdtc.Tests.ps1 index fed7f3975e..ed8b262285 100644 --- a/tests/Get-DbaMsdtc.Tests.ps1 +++ b/tests/Get-DbaMsdtc.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaMsdtc" { $CommandUnderTest = Get-Command Get-DbaMsdtc } It "Should have ComputerName as a 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 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/Get-DbaNetworkActivity.Tests.ps1 b/tests/Get-DbaNetworkActivity.Tests.ps1 index 3617a2b603..e6d42fcd3e 100644 --- a/tests/Get-DbaNetworkActivity.Tests.ps1 +++ b/tests/Get-DbaNetworkActivity.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Get-DbaNetworkActivity" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaNetworkActivity } - It "Should have ComputerName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type String[] -Mandatory:$false + It "Should have ComputerName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.String[] -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/Get-DbaNetworkCertificate.Tests.ps1 b/tests/Get-DbaNetworkCertificate.Tests.ps1 index a7eac24067..6ed0d55238 100644 --- a/tests/Get-DbaNetworkCertificate.Tests.ps1 +++ b/tests/Get-DbaNetworkCertificate.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaNetworkCertificate" { $CommandUnderTest = Get-Command Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Get-DbaNetworkConfiguration.Tests.ps1 b/tests/Get-DbaNetworkConfiguration.Tests.ps1 index 2a514cd459..fdd8a5d1c2 100644 --- a/tests/Get-DbaNetworkConfiguration.Tests.ps1 +++ b/tests/Get-DbaNetworkConfiguration.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaNetworkConfiguration" { $CommandUnderTest = Get-Command Get-DbaNetworkConfiguration } 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 OutputType as a parameter" { - $CommandUnderTest | Should -HaveParameter OutputType -Type String + $CommandUnderTest | Should -HaveParameter OutputType -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/Get-DbaOleDbProvider.Tests.ps1 b/tests/Get-DbaOleDbProvider.Tests.ps1 index 0e49f3dfb4..e9c146d922 100644 --- a/tests/Get-DbaOleDbProvider.Tests.ps1 +++ b/tests/Get-DbaOleDbProvider.Tests.ps1 @@ -5,17 +5,17 @@ Describe "Get-DbaOleDbProvider" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaOleDbProvider } - 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 Provider as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Provider -Type String[] -Mandatory:$false + It "Should have Provider as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Provider -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/Get-DbaOpenTransaction.Tests.ps1 b/tests/Get-DbaOpenTransaction.Tests.ps1 index 5eb7502c70..d3902daeee 100644 --- a/tests/Get-DbaOpenTransaction.Tests.ps1 +++ b/tests/Get-DbaOpenTransaction.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaOpenTransaction" { $CommandUnderTest = Get-Command Get-DbaOpenTransaction } 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/Get-DbaOperatingSystem.Tests.ps1 b/tests/Get-DbaOperatingSystem.Tests.ps1 index 9187217ba3..ada86d5671 100644 --- a/tests/Get-DbaOperatingSystem.Tests.ps1 +++ b/tests/Get-DbaOperatingSystem.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Get-DbaOperatingSystem" { $CommandUnderTest = Get-Command Get-DbaOperatingSystem } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaPageFileSetting.Tests.ps1 b/tests/Get-DbaPageFileSetting.Tests.ps1 index c163b6ecd7..7e1fae2f40 100644 --- a/tests/Get-DbaPageFileSetting.Tests.ps1 +++ b/tests/Get-DbaPageFileSetting.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Get-DbaPageFileSetting" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaPageFileSetting } - 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/Get-DbaPbmCategory.Tests.ps1 b/tests/Get-DbaPbmCategory.Tests.ps1 index 78eb374b77..284023acaf 100644 --- a/tests/Get-DbaPbmCategory.Tests.ps1 +++ b/tests/Get-DbaPbmCategory.Tests.ps1 @@ -18,16 +18,16 @@ Describe "Get-DbaPbmCategory" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Category -Type System.String[] -Mandatory:$false } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject[] -Mandatory:$false } It "Should have ExcludeSystemObject as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemObject -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemObject -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/Get-DbaPbmCategorySubscription.Tests.ps1 b/tests/Get-DbaPbmCategorySubscription.Tests.ps1 index eec2ec146a..0a457fc82a 100644 --- a/tests/Get-DbaPbmCategorySubscription.Tests.ps1 +++ b/tests/Get-DbaPbmCategorySubscription.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaPbmCategorySubscription" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaPbmCategorySubscription } - 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 InputObject as a non-mandatory parameter of type PSObject[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type System.Management.Automation.PSObject[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject[] -Mandatory:$false } It "Should have EnableException as a non-mandatory switch parameter" { $CommandUnderTest | Should -HaveParameter EnableException -Type switch -Mandatory:$false diff --git a/tests/Get-DbaPbmCondition.Tests.ps1 b/tests/Get-DbaPbmCondition.Tests.ps1 index 15cf9c1ff9..6c153542dc 100644 --- a/tests/Get-DbaPbmCondition.Tests.ps1 +++ b/tests/Get-DbaPbmCondition.Tests.ps1 @@ -5,23 +5,23 @@ Describe "Get-DbaPbmCondition" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaPbmCondition } - 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 Condition as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Condition -Type String[] -Mandatory:$false + It "Should have Condition as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Condition -Type System.String[] -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type PSObject[]" { - $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] -Mandatory:$false + It "Should have InputObject as a non-mandatory parameter of type System.Management.Automation.PSObject[]" { + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Management.Automation.PSObject[] -Mandatory:$false } It "Should have IncludeSystemObject as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObject -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystemObject -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/Get-DbaPbmObjectSet.Tests.ps1 b/tests/Get-DbaPbmObjectSet.Tests.ps1 index 68dc31af27..a1adeeba43 100644 --- a/tests/Get-DbaPbmObjectSet.Tests.ps1 +++ b/tests/Get-DbaPbmObjectSet.Tests.ps1 @@ -6,22 +6,22 @@ Describe "Get-DbaPbmObjectSet" { $CommandUnderTest = Get-Command Get-DbaPbmObjectSet } 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 ObjectSet as a parameter" { - $CommandUnderTest | Should -HaveParameter ObjectSet -Type String[] + $CommandUnderTest | Should -HaveParameter ObjectSet -Type System.String[] } 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 IncludeSystemObject as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObject -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemObject -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/Get-DbaPbmPolicy.Tests.ps1 b/tests/Get-DbaPbmPolicy.Tests.ps1 index 407e160244..5887fb661f 100644 --- a/tests/Get-DbaPbmPolicy.Tests.ps1 +++ b/tests/Get-DbaPbmPolicy.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Get-DbaPbmPolicy" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Policy as a parameter" { - $CommandUnderTest | Should -HaveParameter Policy -Type String[] + $CommandUnderTest | Should -HaveParameter Policy -Type System.String[] } It "Should have Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String[] + $CommandUnderTest | Should -HaveParameter Category -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type PSObject[] } It "Should have IncludeSystemObject as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObject -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemObject -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/Get-DbaPbmStore.Tests.ps1 b/tests/Get-DbaPbmStore.Tests.ps1 index baad68ab86..afd093e7fd 100644 --- a/tests/Get-DbaPbmStore.Tests.ps1 +++ b/tests/Get-DbaPbmStore.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaPbmStore" { $CommandUnderTest = Get-Command Get-DbaPbmStore } 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/Get-DbaPermission.Tests.ps1 b/tests/Get-DbaPermission.Tests.ps1 index 1970383436..9ac3dacccb 100644 --- a/tests/Get-DbaPermission.Tests.ps1 +++ b/tests/Get-DbaPermission.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaPermission Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaPermission } 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 IncludeServerLevel as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeServerLevel -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeServerLevel -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExcludeSystemObjects as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemObjects -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemObjects -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/Get-DbaPfAvailableCounter.Tests.ps1 b/tests/Get-DbaPfAvailableCounter.Tests.ps1 index fd94e467c6..2f86c41950 100644 --- a/tests/Get-DbaPfAvailableCounter.Tests.ps1 +++ b/tests/Get-DbaPfAvailableCounter.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaPfAvailableCounter" { $CommandUnderTest = Get-Command Get-DbaPfAvailableCounter } 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 Pattern as a parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String + $CommandUnderTest | Should -HaveParameter Pattern -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/Get-DbaPfDataCollector.Tests.ps1 b/tests/Get-DbaPfDataCollector.Tests.ps1 index 81086cf2ff..7cafed8795 100644 --- a/tests/Get-DbaPfDataCollector.Tests.ps1 +++ b/tests/Get-DbaPfDataCollector.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Get-DbaPfDataCollector" { $CommandUnderTest = Get-Command Get-DbaPfDataCollector } 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 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/Get-DbaPfDataCollectorCounter.Tests.ps1 b/tests/Get-DbaPfDataCollectorCounter.Tests.ps1 index 65d2c9a165..22190286db 100644 --- a/tests/Get-DbaPfDataCollectorCounter.Tests.ps1 +++ b/tests/Get-DbaPfDataCollectorCounter.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaPfDataCollectorCounter" { $CommandUnderTest = Get-Command Get-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 String[] + $CommandUnderTest | Should -HaveParameter Counter -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/Get-DbaPfDataCollectorCounterSample.Tests.ps1 b/tests/Get-DbaPfDataCollectorCounterSample.Tests.ps1 index 251ea63901..2a714d11c5 100644 --- a/tests/Get-DbaPfDataCollectorCounterSample.Tests.ps1 +++ b/tests/Get-DbaPfDataCollectorCounterSample.Tests.ps1 @@ -6,37 +6,37 @@ Describe "Get-DbaPfDataCollectorCounterSample" { $CommandUnderTest = Get-Command Get-DbaPfDataCollectorCounterSample } 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 String[] + $CommandUnderTest | Should -HaveParameter Counter -Type System.String[] } It "Should have Continuous as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Continuous -Type Switch + $CommandUnderTest | Should -HaveParameter Continuous -Type System.Management.Automation.SwitchParameter } It "Should have ListSet as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ListSet -Type Switch[] + $CommandUnderTest | Should -HaveParameter ListSet -Type System.Management.Automation.SwitchParameter[] } It "Should have MaxSamples as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxSamples -Type Int32 + $CommandUnderTest | Should -HaveParameter MaxSamples -Type System.Int32 } It "Should have SampleInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter SampleInterval -Type Int32 + $CommandUnderTest | Should -HaveParameter SampleInterval -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 switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaPfDataCollectorSet.Tests.ps1 b/tests/Get-DbaPfDataCollectorSet.Tests.ps1 index 2a2e054a33..b4c94e2517 100644 --- a/tests/Get-DbaPfDataCollectorSet.Tests.ps1 +++ b/tests/Get-DbaPfDataCollectorSet.Tests.ps1 @@ -9,17 +9,17 @@ Describe "Get-DbaPfDataCollectorSet" { BeforeAll { $CommandUnderTest = Get-Command Get-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 System.Management.Automation.PSCredential" { + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -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 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/Get-DbaPfDataCollectorSetTemplate.Tests.ps1 b/tests/Get-DbaPfDataCollectorSetTemplate.Tests.ps1 index 7601760ed1..a5e90be93f 100644 --- a/tests/Get-DbaPfDataCollectorSetTemplate.Tests.ps1 +++ b/tests/Get-DbaPfDataCollectorSetTemplate.Tests.ps1 @@ -11,17 +11,17 @@ Describe "Get-DbaPfDataCollectorSetTemplate" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaPfDataCollectorSetTemplate } - 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 Pattern as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String -Mandatory:$false + It "Should have Pattern as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String -Mandatory:$false } - It "Should have Template as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] -Mandatory:$false + It "Should have Template as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Template -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/Get-DbaPlanCache.Tests.ps1 b/tests/Get-DbaPlanCache.Tests.ps1 index 14bc6c62ea..a1190210db 100644 --- a/tests/Get-DbaPlanCache.Tests.ps1 +++ b/tests/Get-DbaPlanCache.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Get-DbaPlanCache" { $CommandUnderTest = Get-Command Get-DbaPlanCache } 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/Get-DbaPowerPlan.Tests.ps1 b/tests/Get-DbaPowerPlan.Tests.ps1 index 85ab089724..0ca4001e6f 100644 --- a/tests/Get-DbaPowerPlan.Tests.ps1 +++ b/tests/Get-DbaPowerPlan.Tests.ps1 @@ -12,10 +12,10 @@ Describe "Get-DbaPowerPlan" { $CommandUnderTest = Get-Command Get-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 List as a switch parameter" { $CommandUnderTest | Should -HaveParameter List -Type switch diff --git a/tests/Get-DbaPrivilege.Tests.ps1 b/tests/Get-DbaPrivilege.Tests.ps1 index c672a1d277..3cad525ced 100644 --- a/tests/Get-DbaPrivilege.Tests.ps1 +++ b/tests/Get-DbaPrivilege.Tests.ps1 @@ -5,11 +5,11 @@ Describe "Get-DbaPrivilege" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaPrivilege } - 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 diff --git a/tests/Get-DbaProcess.Tests.ps1 b/tests/Get-DbaProcess.Tests.ps1 index a5899b99b9..b05c9ea457 100644 --- a/tests/Get-DbaProcess.Tests.ps1 +++ b/tests/Get-DbaProcess.Tests.ps1 @@ -24,22 +24,22 @@ Describe "Get-DbaProcess" { $CommandUnderTest | Should -HaveParameter ExcludeSpid -Type Int32[] -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 Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Login -Type System.String[] -Mandatory:$false } It "Should have Hostname as a parameter" { - $CommandUnderTest | Should -HaveParameter Hostname -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Hostname -Type System.String[] -Mandatory:$false } It "Should have Program as a parameter" { - $CommandUnderTest | Should -HaveParameter Program -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Program -Type System.String[] -Mandatory:$false } It "Should have ExcludeSystemSpids as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemSpids -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystemSpids -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/Get-DbaProductKey.Tests.ps1 b/tests/Get-DbaProductKey.Tests.ps1 index 73df2d4368..d159bf7ef2 100644 --- a/tests/Get-DbaProductKey.Tests.ps1 +++ b/tests/Get-DbaProductKey.Tests.ps1 @@ -5,17 +5,17 @@ Describe "Get-DbaProductKey" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaProductKey } - 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 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 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/Get-DbaQueryExecutionTime.Tests.ps1 b/tests/Get-DbaQueryExecutionTime.Tests.ps1 index 34de1071a1..8951bf48d9 100644 --- a/tests/Get-DbaQueryExecutionTime.Tests.ps1 +++ b/tests/Get-DbaQueryExecutionTime.Tests.ps1 @@ -5,32 +5,32 @@ Describe "Get-DbaQueryExecutionTime" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaQueryExecutionTime } - 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have MaxResultsPerDb as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MaxResultsPerDb -Type Int32 -Mandatory:$false + It "Should have MaxResultsPerDb as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MaxResultsPerDb -Type System.Int32 -Mandatory:$false } - It "Should have MinExecs as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MinExecs -Type Int32 -Mandatory:$false + It "Should have MinExecs as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MinExecs -Type System.Int32 -Mandatory:$false } - It "Should have MinExecMs as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter MinExecMs -Type Int32 -Mandatory:$false + It "Should have MinExecMs as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter MinExecMs -Type System.Int32 -Mandatory:$false } It "Should have ExcludeSystem as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystem -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/Get-DbaRandomizedDataset.Tests.ps1 b/tests/Get-DbaRandomizedDataset.Tests.ps1 index 5bffb5e959..0aadd49239 100644 --- a/tests/Get-DbaRandomizedDataset.Tests.ps1 +++ b/tests/Get-DbaRandomizedDataset.Tests.ps1 @@ -5,23 +5,23 @@ Describe "Get-DbaRandomizedDataset" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaRandomizedDataset } - It "Should have Template as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] -Mandatory:$false + It "Should have Template as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Template -Type System.String[] -Mandatory:$false } - It "Should have TemplateFile as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter TemplateFile -Type String[] -Mandatory:$false + It "Should have TemplateFile as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter TemplateFile -Type System.String[] -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 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 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" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Get-DbaRandomizedDatasetTemplate.Tests.ps1 b/tests/Get-DbaRandomizedDatasetTemplate.Tests.ps1 index 0ebaf3d4dc..5d37d5ec24 100644 --- a/tests/Get-DbaRandomizedDatasetTemplate.Tests.ps1 +++ b/tests/Get-DbaRandomizedDatasetTemplate.Tests.ps1 @@ -11,17 +11,17 @@ Describe "Get-DbaRandomizedDatasetTemplate" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaRandomizedDatasetTemplate } - It "Should have Template as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] -Mandatory:$false + It "Should have Template as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Template -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 ExcludeDefault as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDefault -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDefault -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/Get-DbaRandomizedType.Tests.ps1 b/tests/Get-DbaRandomizedType.Tests.ps1 index b4316355b1..04b7498994 100644 --- a/tests/Get-DbaRandomizedType.Tests.ps1 +++ b/tests/Get-DbaRandomizedType.Tests.ps1 @@ -10,17 +10,17 @@ Describe "Get-DbaRandomizedType" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaRandomizedType } - It "Should have RandomizedType as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter RandomizedType -Type String[] -Mandatory:$false + It "Should have RandomizedType as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter RandomizedType -Type System.String[] -Mandatory:$false } - It "Should have RandomizedSubType as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter RandomizedSubType -Type String[] -Mandatory:$false + It "Should have RandomizedSubType as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter RandomizedSubType -Type System.String[] -Mandatory:$false } - It "Should have Pattern as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String -Mandatory:$false + It "Should have Pattern as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter Pattern -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/Get-DbaRandomizedValue.Tests.ps1 b/tests/Get-DbaRandomizedValue.Tests.ps1 index 67e18a0df3..b43e4a0517 100644 --- a/tests/Get-DbaRandomizedValue.Tests.ps1 +++ b/tests/Get-DbaRandomizedValue.Tests.ps1 @@ -5,49 +5,49 @@ Describe "Get-DbaRandomizedValue" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaRandomizedValue } - It "Should have DataType as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter DataType -Type String -Mandatory:$false + It "Should have DataType as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter DataType -Type System.String -Mandatory:$false } - It "Should have RandomizerType as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter RandomizerType -Type String -Mandatory:$false + It "Should have RandomizerType as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter RandomizerType -Type System.String -Mandatory:$false } - It "Should have RandomizerSubType as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter RandomizerSubType -Type String -Mandatory:$false + It "Should have RandomizerSubType as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter RandomizerSubType -Type System.String -Mandatory:$false } - It "Should have Min as a non-mandatory Object parameter" { - $CommandUnderTest | Should -HaveParameter Min -Type Object -Mandatory:$false + It "Should have Min as a non-mandatory System.Object parameter" { + $CommandUnderTest | Should -HaveParameter Min -Type System.Object -Mandatory:$false } - It "Should have Max as a non-mandatory Object parameter" { - $CommandUnderTest | Should -HaveParameter Max -Type Object -Mandatory:$false + It "Should have Max as a non-mandatory System.Object parameter" { + $CommandUnderTest | Should -HaveParameter Max -Type System.Object -Mandatory:$false } - It "Should have Precision as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter Precision -Type Int32 -Mandatory:$false + It "Should have Precision as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter Precision -Type System.Int32 -Mandatory:$false } - It "Should have CharacterString as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter CharacterString -Type String -Mandatory:$false + It "Should have CharacterString as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter CharacterString -Type System.String -Mandatory:$false } - It "Should have Format as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Format -Type String -Mandatory:$false + It "Should have Format as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Format -Type System.String -Mandatory:$false } - It "Should have Symbol as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Symbol -Type String -Mandatory:$false + It "Should have Symbol as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Symbol -Type System.String -Mandatory:$false } - It "Should have Separator as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Separator -Type String -Mandatory:$false + It "Should have Separator as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Separator -Type System.String -Mandatory:$false } - It "Should have Value as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Value -Type String -Mandatory:$false + It "Should have Value as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Value -Type System.String -Mandatory:$false } - It "Should have Locale as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Locale -Type String -Mandatory:$false + It "Should have Locale as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Locale -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 } } Context "Command returns values" { - It "Should return a String type" { + It "Should return a System.String type" { $result = Get-DbaRandomizedValue -DataType varchar $result | Should -BeOfType [String] } diff --git a/tests/Get-DbaRegServer.Tests.ps1 b/tests/Get-DbaRegServer.Tests.ps1 index 5d767f1049..2525f1cd66 100644 --- a/tests/Get-DbaRegServer.Tests.ps1 +++ b/tests/Get-DbaRegServer.Tests.ps1 @@ -61,37 +61,37 @@ Describe "Get-DbaRegServer" { $CommandUnderTest = Get-Command Get-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 ExcludeGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeGroup -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeGroup -Type System.String[] } It "Should have Id as a parameter" { - $CommandUnderTest | Should -HaveParameter Id -Type Int32[] + $CommandUnderTest | Should -HaveParameter Id -Type System.Int32[] } It "Should have IncludeSelf as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSelf -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSelf -Type System.Management.Automation.SwitchParameter } It "Should have ResolveNetworkName as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ResolveNetworkName -Type Switch + $CommandUnderTest | Should -HaveParameter ResolveNetworkName -Type System.Management.Automation.SwitchParameter } It "Should have IncludeLocal as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeLocal -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeLocal -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/Get-DbaRegServerGroup.Tests.ps1 b/tests/Get-DbaRegServerGroup.Tests.ps1 index 8499774b13..56acd7a86b 100644 --- a/tests/Get-DbaRegServerGroup.Tests.ps1 +++ b/tests/Get-DbaRegServerGroup.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Get-DbaRegServerGroup" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Group as a parameter" { - $CommandUnderTest | Should -HaveParameter Group -Type Object[] + $CommandUnderTest | Should -HaveParameter Group -Type System.Object[] } It "Should have ExcludeGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeGroup -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeGroup -Type System.Object[] } It "Should have Id as a parameter" { - $CommandUnderTest | Should -HaveParameter Id -Type Int32[] + $CommandUnderTest | Should -HaveParameter Id -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/Get-DbaRegServerStore.Tests.ps1 b/tests/Get-DbaRegServerStore.Tests.ps1 index 3932de18e7..28f3b67709 100644 --- a/tests/Get-DbaRegServerStore.Tests.ps1 +++ b/tests/Get-DbaRegServerStore.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaRegServerStore" { $CommandUnderTest = Get-Command Get-DbaRegServerStore } 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/Get-DbaRegistryRoot.Tests.ps1 b/tests/Get-DbaRegistryRoot.Tests.ps1 index f14ffe54ec..e0e9eca160 100644 --- a/tests/Get-DbaRegistryRoot.Tests.ps1 +++ b/tests/Get-DbaRegistryRoot.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaRegistryRoot" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaRegistryRoot } - 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/Get-DbaReplArticle.Tests.ps1 b/tests/Get-DbaReplArticle.Tests.ps1 index 07b0262769..b7b5210f54 100644 --- a/tests/Get-DbaReplArticle.Tests.ps1 +++ b/tests/Get-DbaReplArticle.Tests.ps1 @@ -10,26 +10,26 @@ Describe "Get-DbaReplArticle" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaReplArticle } - 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 Publication as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter Publication -Type Object[] -Mandatory:$false + It "Should have Publication as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter Publication -Type System.Object[] -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 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 } } } diff --git a/tests/Get-DbaReplArticleColumn.Tests.ps1 b/tests/Get-DbaReplArticleColumn.Tests.ps1 index 60b11f5214..90b0fcc0fc 100644 --- a/tests/Get-DbaReplArticleColumn.Tests.ps1 +++ b/tests/Get-DbaReplArticleColumn.Tests.ps1 @@ -10,26 +10,26 @@ Describe "Get-DbaReplArticleColumn" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaReplArticleColumn } - 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 Publication as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter Publication -Type Object[] -Mandatory:$false + It "Should have Publication as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter Publication -Type System.Object[] -Mandatory:$false } - It "Should have Article as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Article -Type String[] -Mandatory:$false + It "Should have Article as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Article -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 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/Get-DbaReplDistributor.Tests.ps1 b/tests/Get-DbaReplDistributor.Tests.ps1 index c4a5f7bbd3..a4d04ffbb0 100644 --- a/tests/Get-DbaReplDistributor.Tests.ps1 +++ b/tests/Get-DbaReplDistributor.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaReplDistributor" { $CommandUnderTest = Get-Command Get-DbaReplDistributor } 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/Get-DbaReplPublication.Tests.ps1 b/tests/Get-DbaReplPublication.Tests.ps1 index 33ee04d39e..8e6d09950b 100644 --- a/tests/Get-DbaReplPublication.Tests.ps1 +++ b/tests/Get-DbaReplPublication.Tests.ps1 @@ -10,22 +10,22 @@ Describe "Get-DbaReplPublication" { $CommandUnderTest = Get-Command Get-DbaReplPublication } 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 Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Name -Type System.String -Mandatory:$false } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Type -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/Get-DbaReplPublisher.Tests.ps1 b/tests/Get-DbaReplPublisher.Tests.ps1 index 7517aa9f67..765220f2f3 100644 --- a/tests/Get-DbaReplPublisher.Tests.ps1 +++ b/tests/Get-DbaReplPublisher.Tests.ps1 @@ -11,13 +11,13 @@ Describe "Get-DbaReplPublisher" { $CommandUnderTest = Get-Command Get-DbaReplPublisher } 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/Get-DbaReplServer.Tests.ps1 b/tests/Get-DbaReplServer.Tests.ps1 index 59ca958e96..fc79a76746 100644 --- a/tests/Get-DbaReplServer.Tests.ps1 +++ b/tests/Get-DbaReplServer.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaReplServer" { $CommandUnderTest = Get-Command Get-DbaReplServer } 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/Get-DbaReplSubscription.Tests.ps1 b/tests/Get-DbaReplSubscription.Tests.ps1 index f966adb9a1..89d3cf05f7 100644 --- a/tests/Get-DbaReplSubscription.Tests.ps1 +++ b/tests/Get-DbaReplSubscription.Tests.ps1 @@ -11,28 +11,28 @@ Describe "Get-DbaReplSubscription" { $CommandUnderTest = Get-Command Get-DbaReplSubscription } 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 PublicationName as a parameter" { - $CommandUnderTest | Should -HaveParameter PublicationName -Type String[] + $CommandUnderTest | Should -HaveParameter PublicationName -Type System.String[] } It "Should have SubscriberName as a parameter" { - $CommandUnderTest | Should -HaveParameter SubscriberName -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter SubscriberName -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have SubscriptionDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter SubscriptionDatabase -Type Object[] + $CommandUnderTest | Should -HaveParameter SubscriptionDatabase -Type System.Object[] } It "Should have Type as a parameter" { - $CommandUnderTest | Should -HaveParameter Type -Type Object[] + $CommandUnderTest | Should -HaveParameter Type -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/Get-DbaResourceGovernor.Tests.ps1 b/tests/Get-DbaResourceGovernor.Tests.ps1 index 967c715c6e..b0095f4e92 100644 --- a/tests/Get-DbaResourceGovernor.Tests.ps1 +++ b/tests/Get-DbaResourceGovernor.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaResourceGovernor" { $CommandUnderTest = Get-Command Get-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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Get-DbaRgClassifierFunction.Tests.ps1 b/tests/Get-DbaRgClassifierFunction.Tests.ps1 index 6097716917..88f579e570 100644 --- a/tests/Get-DbaRgClassifierFunction.Tests.ps1 +++ b/tests/Get-DbaRgClassifierFunction.Tests.ps1 @@ -9,13 +9,13 @@ Describe "Get-DbaRgClassifierFunction" { $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 InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type ResourceGovernor[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.ResourceGovernor[] -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/Get-DbaRgResourcePool.Tests.ps1 b/tests/Get-DbaRgResourcePool.Tests.ps1 index bb160675e2..a55764b605 100644 --- a/tests/Get-DbaRgResourcePool.Tests.ps1 +++ b/tests/Get-DbaRgResourcePool.Tests.ps1 @@ -16,13 +16,13 @@ Describe "Get-DbaRgResourcePool" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 ResourceGovernor[] } 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/Get-DbaRunningJob.Tests.ps1 b/tests/Get-DbaRunningJob.Tests.ps1 index 1a3a48a9e2..632547aeea 100644 --- a/tests/Get-DbaRunningJob.Tests.ps1 +++ b/tests/Get-DbaRunningJob.Tests.ps1 @@ -5,13 +5,13 @@ Describe "Get-DbaRunningJob" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaRunningJob } - 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 InputObject as a non-mandatory parameter of type Job[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.Smo.Agent.Job[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Agent.Job[] -Mandatory:$false } It "Should have EnableException as a non-mandatory switch parameter" { diff --git a/tests/Get-DbaSchemaChangeHistory.Tests.ps1 b/tests/Get-DbaSchemaChangeHistory.Tests.ps1 index ccad993fb6..fadda0464a 100644 --- a/tests/Get-DbaSchemaChangeHistory.Tests.ps1 +++ b/tests/Get-DbaSchemaChangeHistory.Tests.ps1 @@ -5,26 +5,26 @@ Describe "Get-DbaSchemaChangeHistory" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaSchemaChangeHistory } - 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } - It "Should have Since as a non-mandatory parameter of type DbaDateTime" { - $CommandUnderTest | Should -HaveParameter Since -Type DbaDateTime -Mandatory:$false + It "Should have Since as a non-mandatory parameter of type Dataplat.Dbatools.Utility.DbaDateTime" { + $CommandUnderTest | Should -HaveParameter Since -Type Dataplat.Dbatools.Utility.DbaDateTime -Mandatory:$false } - It "Should have Object as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Object -Type String[] -Mandatory:$false + It "Should have Object as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Object -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/Get-DbaServerRole.Tests.ps1 b/tests/Get-DbaServerRole.Tests.ps1 index 6f475c9215..963d73fb3a 100644 --- a/tests/Get-DbaServerRole.Tests.ps1 +++ b/tests/Get-DbaServerRole.Tests.ps1 @@ -16,16 +16,16 @@ Describe "Get-DbaServerRole" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have ServerRole parameter" { - $CommandUnderTest | Should -HaveParameter ServerRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ServerRole -Type System.String[] -Mandatory:$false } It "Should have ExcludeServerRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeServerRole -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeServerRole -Type System.String[] -Mandatory:$false } It "Should have ExcludeFixedRole parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -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/Get-DbaServerRoleMember.Tests.ps1 b/tests/Get-DbaServerRoleMember.Tests.ps1 index 62b8bd0add..f72ab15e7e 100644 --- a/tests/Get-DbaServerRoleMember.Tests.ps1 +++ b/tests/Get-DbaServerRoleMember.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Get-DbaServerRoleMember Unit Tests" -Tag "UnitTests" { $CommandUnderTest = Get-Command Get-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 ExcludeServerRole as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeServerRole -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeServerRole -Type System.String[] } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type Object[] + $CommandUnderTest | Should -HaveParameter Login -Type System.Object[] } It "Should have ExcludeFixedRole as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeFixedRole -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/Get-DbaService.Tests.ps1 b/tests/Get-DbaService.Tests.ps1 index e6393746a4..0eab61e030 100644 --- a/tests/Get-DbaService.Tests.ps1 +++ b/tests/Get-DbaService.Tests.ps1 @@ -13,26 +13,26 @@ Describe "Get-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 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 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 ServiceName as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter ServiceName -Type String[] -Mandatory:$false + It "Should have ServiceName as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter ServiceName -Type System.String[] -Mandatory:$false } It "Should have AdvancedProperties as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter AdvancedProperties -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AdvancedProperties -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/Get-DbaSpinLockStatistic.Tests.ps1 b/tests/Get-DbaSpinLockStatistic.Tests.ps1 index 12c38d0357..12d0df4a1f 100644 --- a/tests/Get-DbaSpinLockStatistic.Tests.ps1 +++ b/tests/Get-DbaSpinLockStatistic.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaSpinLockStatistic" { $CommandUnderTest = Get-Command Get-DbaSpinLockStatistic } 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/Get-DbaSpn.Tests.ps1 b/tests/Get-DbaSpn.Tests.ps1 index 8016567cfe..d43b2e14ed 100644 --- a/tests/Get-DbaSpn.Tests.ps1 +++ b/tests/Get-DbaSpn.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaSpn" { $CommandUnderTest = Get-Command Get-DbaSpn } It "Accepts ComputerName as a parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.String[] -Mandatory:$false } It "Accepts AccountName as a parameter" { - $CommandUnderTest | Should -HaveParameter AccountName -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AccountName -Type System.String[] -Mandatory:$false } It "Accepts Credential as a parameter" { - $CommandUnderTest | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -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/Get-DbaSsisEnvironmentVariable.Tests.ps1 b/tests/Get-DbaSsisEnvironmentVariable.Tests.ps1 index 0651e1193f..bbb00ac057 100644 --- a/tests/Get-DbaSsisEnvironmentVariable.Tests.ps1 +++ b/tests/Get-DbaSsisEnvironmentVariable.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Get-DbaSsisEnvironmentVariable" { $CommandUnderTest = Get-Command Get-DbaSsisEnvironmentVariable } 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 Environment as a parameter" { - $CommandUnderTest | Should -HaveParameter Environment -Type Object[] + $CommandUnderTest | Should -HaveParameter Environment -Type System.Object[] } It "Should have EnvironmentExclude as a parameter" { - $CommandUnderTest | Should -HaveParameter EnvironmentExclude -Type Object[] + $CommandUnderTest | Should -HaveParameter EnvironmentExclude -Type System.Object[] } It "Should have Folder as a parameter" { - $CommandUnderTest | Should -HaveParameter Folder -Type Object[] + $CommandUnderTest | Should -HaveParameter Folder -Type System.Object[] } It "Should have FolderExclude as a parameter" { - $CommandUnderTest | Should -HaveParameter FolderExclude -Type Object[] + $CommandUnderTest | Should -HaveParameter FolderExclude -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/Get-DbaSsisExecutionHistory.Tests.ps1 b/tests/Get-DbaSsisExecutionHistory.Tests.ps1 index be271546b7..0449405043 100644 --- a/tests/Get-DbaSsisExecutionHistory.Tests.ps1 +++ b/tests/Get-DbaSsisExecutionHistory.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Get-DbaSsisExecutionHistory" { $CommandUnderTest = Get-Command Get-DbaSsisExecutionHistory } 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 Since as a parameter" { - $CommandUnderTest | Should -HaveParameter Since -Type DateTime + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime } It "Should have Status as a parameter" { - $CommandUnderTest | Should -HaveParameter Status -Type String[] + $CommandUnderTest | Should -HaveParameter Status -Type System.String[] } It "Should have Project as a parameter" { - $CommandUnderTest | Should -HaveParameter Project -Type String[] + $CommandUnderTest | Should -HaveParameter Project -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 Environment as a parameter" { - $CommandUnderTest | Should -HaveParameter Environment -Type String[] + $CommandUnderTest | Should -HaveParameter Environment -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/Get-DbaStartupParameter.Tests.ps1 b/tests/Get-DbaStartupParameter.Tests.ps1 index 03faf8c424..07d29c654a 100644 --- a/tests/Get-DbaStartupParameter.Tests.ps1 +++ b/tests/Get-DbaStartupParameter.Tests.ps1 @@ -9,17 +9,17 @@ Describe "Get-DbaStartupParameter" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaStartupParameter } - 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 Simple as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Simple -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Simple -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/Get-DbaStartupProcedure.Tests.ps1 b/tests/Get-DbaStartupProcedure.Tests.ps1 index 1512c5da0a..784cb6b495 100644 --- a/tests/Get-DbaStartupProcedure.Tests.ps1 +++ b/tests/Get-DbaStartupProcedure.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaStartupProcedure" { $CommandUnderTest = Get-Command Get-DbaStartupProcedure } 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 StartupProcedure as a parameter" { - $CommandUnderTest | Should -HaveParameter StartupProcedure -Type String[] + $CommandUnderTest | Should -HaveParameter StartupProcedure -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/Get-DbaSuspectPage.Tests.ps1 b/tests/Get-DbaSuspectPage.Tests.ps1 index c31256fe99..ed89ce6309 100644 --- a/tests/Get-DbaSuspectPage.Tests.ps1 +++ b/tests/Get-DbaSuspectPage.Tests.ps1 @@ -6,16 +6,16 @@ Describe "Get-DbaSuspectPage" { $CommandUnderTest = Get-Command Get-DbaSuspectPage } 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 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/Get-DbaTcpPort.Tests.ps1 b/tests/Get-DbaTcpPort.Tests.ps1 index f1863ce3fc..866b70ff26 100644 --- a/tests/Get-DbaTcpPort.Tests.ps1 +++ b/tests/Get-DbaTcpPort.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Get-DbaTcpPort" { $CommandUnderTest = Get-Command Get-DbaTcpPort } 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 All as a switch parameter" { - $CommandUnderTest | Should -HaveParameter All -Type Switch + $CommandUnderTest | Should -HaveParameter All -Type System.Management.Automation.SwitchParameter } It "Should have ExcludeIpv6 as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeIpv6 -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeIpv6 -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/Get-DbaTempdbUsage.Tests.ps1 b/tests/Get-DbaTempdbUsage.Tests.ps1 index 3b677389d4..38ed15f6c2 100644 --- a/tests/Get-DbaTempdbUsage.Tests.ps1 +++ b/tests/Get-DbaTempdbUsage.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaTempdbUsage" { $CommandUnderTest = Get-Command Get-DbaTempdbUsage } 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/Get-DbaTopResourceUsage.Tests.ps1 b/tests/Get-DbaTopResourceUsage.Tests.ps1 index 1e8366f6d6..d164fc3c66 100644 --- a/tests/Get-DbaTopResourceUsage.Tests.ps1 +++ b/tests/Get-DbaTopResourceUsage.Tests.ps1 @@ -11,23 +11,23 @@ Describe "Get-DbaTopResourceUsage" { 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 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -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 Limit as a non-mandatory parameter of type Int32" { - $CommandUnderTest | Should -HaveParameter Limit -Type Int32 -Mandatory:$false + It "Should have Limit as a non-mandatory parameter of type System.Int32" { + $CommandUnderTest | Should -HaveParameter Limit -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 } It "Should have ExcludeSystem as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeSystem -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Get-DbaTrace.Tests.ps1 b/tests/Get-DbaTrace.Tests.ps1 index d0056c6b79..c610ff84f1 100644 --- a/tests/Get-DbaTrace.Tests.ps1 +++ b/tests/Get-DbaTrace.Tests.ps1 @@ -35,19 +35,19 @@ Describe "Get-DbaTrace" { $CommandUnderTest = Get-Command Get-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 Default as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Default -Type Switch + $CommandUnderTest | Should -HaveParameter Default -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/Get-DbaTraceFlag.Tests.ps1 b/tests/Get-DbaTraceFlag.Tests.ps1 index 862dbe3a2e..4462e398bc 100644 --- a/tests/Get-DbaTraceFlag.Tests.ps1 +++ b/tests/Get-DbaTraceFlag.Tests.ps1 @@ -5,17 +5,17 @@ Describe "Get-DbaTraceFlag" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaTraceFlag } - 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 TraceFlag as a non-mandatory parameter of type Int32[]" { - $CommandUnderTest | Should -HaveParameter TraceFlag -Type Int32[] -Mandatory:$false + It "Should have TraceFlag as a non-mandatory parameter of type System.Int32[]" { + $CommandUnderTest | Should -HaveParameter TraceFlag -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/Get-DbaUpTime.Tests.ps1 b/tests/Get-DbaUpTime.Tests.ps1 index 4ae0ede36a..c555692c65 100644 --- a/tests/Get-DbaUpTime.Tests.ps1 +++ b/tests/Get-DbaUpTime.Tests.ps1 @@ -12,16 +12,16 @@ Describe "Get-DbaUptime" { $CommandUnderTest = Get-Command Get-DbaUptime } 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/Get-DbaUserPermission.Tests.ps1 b/tests/Get-DbaUserPermission.Tests.ps1 index 792b029912..ceb3830450 100644 --- a/tests/Get-DbaUserPermission.Tests.ps1 +++ b/tests/Get-DbaUserPermission.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Get-DbaUserPermission Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Get-DbaUserPermission } 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 ExcludeSystemDatabase as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSystemDatabase -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSystemDatabase -Type System.Management.Automation.SwitchParameter } It "Should have IncludePublicGuest as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludePublicGuest -Type Switch + $CommandUnderTest | Should -HaveParameter IncludePublicGuest -Type System.Management.Automation.SwitchParameter } It "Should have IncludeSystemObjects as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemObjects -Type System.Management.Automation.SwitchParameter } It "Should have ExcludeSecurables as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSecurables -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeSecurables -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/Get-DbaWaitResource.Tests.ps1 b/tests/Get-DbaWaitResource.Tests.ps1 index 3befc0b2fd..6b6f7153f8 100644 --- a/tests/Get-DbaWaitResource.Tests.ps1 +++ b/tests/Get-DbaWaitResource.Tests.ps1 @@ -6,19 +6,19 @@ Describe "Get-DbaWaitResource" { $CommandUnderTest = Get-Command Get-DbaWaitResource } 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 WaitResource parameter" { - $CommandUnderTest | Should -HaveParameter WaitResource -Type String + $CommandUnderTest | Should -HaveParameter WaitResource -Type System.String } It "Should have Row parameter" { - $CommandUnderTest | Should -HaveParameter Row -Type Switch + $CommandUnderTest | Should -HaveParameter Row -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/Get-DbaWaitStatistic.Tests.ps1 b/tests/Get-DbaWaitStatistic.Tests.ps1 index 6e383ebf41..e30513984b 100644 --- a/tests/Get-DbaWaitStatistic.Tests.ps1 +++ b/tests/Get-DbaWaitStatistic.Tests.ps1 @@ -15,16 +15,16 @@ Describe "Get-DbaWaitStatistic" { $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 Threshold as a parameter" { - $CommandUnderTest | Should -HaveParameter Threshold -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Threshold -Type System.Int32 -Mandatory:$false } It "Should have IncludeIgnorable as a parameter" { - $CommandUnderTest | Should -HaveParameter IncludeIgnorable -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeIgnorable -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/Get-DbaWaitingTask.Tests.ps1 b/tests/Get-DbaWaitingTask.Tests.ps1 index df184a952e..148bee5ae1 100644 --- a/tests/Get-DbaWaitingTask.Tests.ps1 +++ b/tests/Get-DbaWaitingTask.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaWaitingTask" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Spid as a parameter" { - $CommandUnderTest | Should -HaveParameter Spid -Type Object[] + $CommandUnderTest | Should -HaveParameter Spid -Type System.Object[] } It "Should have IncludeSystemSpid as a switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemSpid -Type Switch + $CommandUnderTest | Should -HaveParameter IncludeSystemSpid -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/Get-DbaWindowsLog.Tests.ps1 b/tests/Get-DbaWindowsLog.Tests.ps1 index 81a03e981f..1d943c90ae 100644 --- a/tests/Get-DbaWindowsLog.Tests.ps1 +++ b/tests/Get-DbaWindowsLog.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Get-DbaWindowsLog" { $CommandUnderTest = Get-Command Get-DbaWindowsLog } 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 Start as a parameter" { - $CommandUnderTest | Should -HaveParameter Start -Type DateTime + $CommandUnderTest | Should -HaveParameter Start -Type System.DateTime } It "Should have End as a parameter" { - $CommandUnderTest | Should -HaveParameter End -Type DateTime + $CommandUnderTest | Should -HaveParameter End -Type System.DateTime } 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 MaxThreads as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxThreads -Type Int32 + $CommandUnderTest | Should -HaveParameter MaxThreads -Type System.Int32 } It "Should have MaxRemoteThreads as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxRemoteThreads -Type Int32 + $CommandUnderTest | Should -HaveParameter MaxRemoteThreads -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/Get-DbaWsfcAvailableDisk.Tests.ps1 b/tests/Get-DbaWsfcAvailableDisk.Tests.ps1 index 6e5df229b0..e30fb5e2d7 100644 --- a/tests/Get-DbaWsfcAvailableDisk.Tests.ps1 +++ b/tests/Get-DbaWsfcAvailableDisk.Tests.ps1 @@ -11,11 +11,11 @@ Describe "Get-DbaWsfcAvailableDisk" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaWsfcAvailableDisk } - 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 diff --git a/tests/Get-DbaWsfcCluster.Tests.ps1 b/tests/Get-DbaWsfcCluster.Tests.ps1 index 57ccfabfe3..113c10230c 100644 --- a/tests/Get-DbaWsfcCluster.Tests.ps1 +++ b/tests/Get-DbaWsfcCluster.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Get-DbaWsfcCluster" { $CommandUnderTest = Get-Command Get-DbaWsfcCluster } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaWsfcDisk.Tests.ps1 b/tests/Get-DbaWsfcDisk.Tests.ps1 index 818727037b..33466105c1 100644 --- a/tests/Get-DbaWsfcDisk.Tests.ps1 +++ b/tests/Get-DbaWsfcDisk.Tests.ps1 @@ -11,14 +11,14 @@ Describe "Get-DbaWsfcDisk" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaWsfcDisk } - 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/Get-DbaWsfcNetwork.Tests.ps1 b/tests/Get-DbaWsfcNetwork.Tests.ps1 index 76a3d17565..3cef8c0999 100644 --- a/tests/Get-DbaWsfcNetwork.Tests.ps1 +++ b/tests/Get-DbaWsfcNetwork.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaWsfcNetwork" { $CommandUnderTest = Get-Command Get-DbaWsfcNetwork } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaWsfcNetworkInterface.Tests.ps1 b/tests/Get-DbaWsfcNetworkInterface.Tests.ps1 index 4d641ec766..a4e95c4f55 100644 --- a/tests/Get-DbaWsfcNetworkInterface.Tests.ps1 +++ b/tests/Get-DbaWsfcNetworkInterface.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaWsfcNetworkInterface" { $CommandUnderTest = Get-Command Get-DbaWsfcNetworkInterface } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Get-DbaWsfcNode.Tests.ps1 b/tests/Get-DbaWsfcNode.Tests.ps1 index 7f9c88ff24..2a2d8bbf6d 100644 --- a/tests/Get-DbaWsfcNode.Tests.ps1 +++ b/tests/Get-DbaWsfcNode.Tests.ps1 @@ -5,14 +5,14 @@ Describe "Get-DbaWsfcNode" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaWsfcNode } - 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/Get-DbaWsfcResource.Tests.ps1 b/tests/Get-DbaWsfcResource.Tests.ps1 index 8359d2183d..85a6476d6a 100644 --- a/tests/Get-DbaWsfcResource.Tests.ps1 +++ b/tests/Get-DbaWsfcResource.Tests.ps1 @@ -11,11 +11,11 @@ Describe "Get-DbaWsfcResource" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaWsfcResource } - 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 diff --git a/tests/Get-DbaWsfcResourceGroup.Tests.ps1 b/tests/Get-DbaWsfcResourceGroup.Tests.ps1 index aeb6915cb4..93c306a567 100644 --- a/tests/Get-DbaWsfcResourceGroup.Tests.ps1 +++ b/tests/Get-DbaWsfcResourceGroup.Tests.ps1 @@ -9,17 +9,17 @@ Describe "Get-DbaWsfcResourceGroup" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaWsfcResourceGroup } - 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 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 } } } diff --git a/tests/Get-DbaWsfcResourceType.Tests.ps1 b/tests/Get-DbaWsfcResourceType.Tests.ps1 index 70c76af3ea..ceb65ef7d5 100644 --- a/tests/Get-DbaWsfcResourceType.Tests.ps1 +++ b/tests/Get-DbaWsfcResourceType.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Get-DbaWsfcResourceType" { $CommandUnderTest = Get-Command Get-DbaWsfcResourceType } It "Should have ComputerName as a 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 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/Get-DbaWsfcRole.Tests.ps1 b/tests/Get-DbaWsfcRole.Tests.ps1 index f395060fc8..154dc6319f 100644 --- a/tests/Get-DbaWsfcRole.Tests.ps1 +++ b/tests/Get-DbaWsfcRole.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaWsfcRole" { $CommandUnderTest = Get-Command Get-DbaWsfcRole } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbaWsfcSharedVolume.Tests.ps1 b/tests/Get-DbaWsfcSharedVolume.Tests.ps1 index 13dc48f342..75bd653c81 100644 --- a/tests/Get-DbaWsfcSharedVolume.Tests.ps1 +++ b/tests/Get-DbaWsfcSharedVolume.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaWsfcSharedVolume" { $CommandUnderTest = Get-Command Get-DbaWsfcSharedVolume } 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 EnableException as a parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Get-DbaXEObject.Tests.ps1 b/tests/Get-DbaXEObject.Tests.ps1 index 4be418a4b6..0db5ed19d1 100644 --- a/tests/Get-DbaXEObject.Tests.ps1 +++ b/tests/Get-DbaXEObject.Tests.ps1 @@ -12,10 +12,10 @@ Describe "Get-DbaXEObject" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type 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 } } diff --git a/tests/Get-DbaXESession.Tests.ps1 b/tests/Get-DbaXESession.Tests.ps1 index e1cbcc48dc..ee7f8fc8de 100644 --- a/tests/Get-DbaXESession.Tests.ps1 +++ b/tests/Get-DbaXESession.Tests.ps1 @@ -9,17 +9,17 @@ Describe "Get-DbaXESession" { BeforeAll { $CommandUnderTest = Get-Command Get-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 Session as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter Session -Type Object[] -Mandatory:$false + It "Should have Session as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter Session -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/Get-DbaXESessionTarget.Tests.ps1 b/tests/Get-DbaXESessionTarget.Tests.ps1 index 3a21697316..1bfd563eb5 100644 --- a/tests/Get-DbaXESessionTarget.Tests.ps1 +++ b/tests/Get-DbaXESessionTarget.Tests.ps1 @@ -5,19 +5,19 @@ Describe "Get-DbaXESessionTarget" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaXESessionTarget } - 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 Session as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Session -Type String[] -Mandatory:$false + It "Should have Session as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Session -Type System.String[] -Mandatory:$false } - It "Should have Target as a non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Target -Type String[] -Mandatory:$false + It "Should have Target as a non-mandatory parameter of type System.String[]" { + $CommandUnderTest | Should -HaveParameter Target -Type System.String[] -Mandatory:$false } - It "Should have InputObject as a non-mandatory parameter of type Session[]" { + It "Should have InputObject as a non-mandatory parameter of type Microsoft.SqlServer.Management.XEvent.Session[]" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Session[] -Mandatory:$false } It "Should have EnableException as a non-mandatory switch parameter" { diff --git a/tests/Get-DbaXESessionTargetFile.Tests.ps1 b/tests/Get-DbaXESessionTargetFile.Tests.ps1 index b64573cccc..2ca9eb8f76 100644 --- a/tests/Get-DbaXESessionTargetFile.Tests.ps1 +++ b/tests/Get-DbaXESessionTargetFile.Tests.ps1 @@ -14,22 +14,22 @@ Describe "Get-DbaXESessionTargetFile" { $CommandUnderTest = Get-Command Get-DbaXESessionTargetFile } 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 String[] + $CommandUnderTest | Should -HaveParameter Session -Type System.String[] } It "Should have Target as a parameter" { - $CommandUnderTest | Should -HaveParameter Target -Type String[] + $CommandUnderTest | Should -HaveParameter Target -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.XEvent.Target[] } 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/Get-DbaXESessionTemplate.Tests.ps1 b/tests/Get-DbaXESessionTemplate.Tests.ps1 index c9cf2cd17d..51298db281 100644 --- a/tests/Get-DbaXESessionTemplate.Tests.ps1 +++ b/tests/Get-DbaXESessionTemplate.Tests.ps1 @@ -11,17 +11,17 @@ Describe "Get-DbaXESessionTemplate" { BeforeAll { $CommandUnderTest = Get-Command Get-DbaXESessionTemplate } - 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 Pattern as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Pattern -Type String -Mandatory:$false + It "Should have Pattern as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Pattern -Type System.String -Mandatory:$false } - It "Should have Template as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] -Mandatory:$false + It "Should have Template as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter Template -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/Get-DbaXESmartTarget.Tests.ps1 b/tests/Get-DbaXESmartTarget.Tests.ps1 index e7ae071fd3..b77b25dcf0 100644 --- a/tests/Get-DbaXESmartTarget.Tests.ps1 +++ b/tests/Get-DbaXESmartTarget.Tests.ps1 @@ -6,7 +6,7 @@ Describe "Get-DbaXESmartTarget" { $CommandUnderTest = Get-Command Get-DbaXESmartTarget } 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.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Get-DbaXEStore.Tests.ps1 b/tests/Get-DbaXEStore.Tests.ps1 index 6fdc05ee6d..261a7693d8 100644 --- a/tests/Get-DbaXEStore.Tests.ps1 +++ b/tests/Get-DbaXEStore.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbaXEStore" { $CommandUnderTest = Get-Command Get-DbaXEStore } 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/Get-DbatoolsChangeLog.Tests.ps1 b/tests/Get-DbatoolsChangeLog.Tests.ps1 index af4c1706e9..45f31c94f8 100644 --- a/tests/Get-DbatoolsChangeLog.Tests.ps1 +++ b/tests/Get-DbatoolsChangeLog.Tests.ps1 @@ -21,7 +21,7 @@ Describe "Get-DbatoolsChangeLog" { It "Example integration test" { # Add integration test here - $true | Should -Be $true + $true | Should -Be [System.Boolean]::True } AfterAll { diff --git a/tests/Get-DbatoolsConfig.Tests.ps1 b/tests/Get-DbatoolsConfig.Tests.ps1 index 9f335df623..267ada9c63 100644 --- a/tests/Get-DbatoolsConfig.Tests.ps1 +++ b/tests/Get-DbatoolsConfig.Tests.ps1 @@ -5,17 +5,17 @@ Describe "Get-DbatoolsConfig" { BeforeAll { $CommandUnderTest = Get-Command Get-DbatoolsConfig } - It "Should have parameter FullName of type String" { - $CommandUnderTest | Should -HaveParameter FullName -Type String -Mandatory:$false + It "Should have parameter FullName of type System.String" { + $CommandUnderTest | Should -HaveParameter FullName -Type System.String -Mandatory:$false } - It "Should have parameter Name of type String" { - $CommandUnderTest | Should -HaveParameter Name -Type String -Mandatory:$false + It "Should have parameter Name of type System.String" { + $CommandUnderTest | Should -HaveParameter Name -Type System.String -Mandatory:$false } - It "Should have parameter Module of type String" { - $CommandUnderTest | Should -HaveParameter Module -Type String -Mandatory:$false + It "Should have parameter Module of type System.String" { + $CommandUnderTest | Should -HaveParameter Module -Type System.String -Mandatory:$false } - It "Should have parameter Force of type Switch" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false + It "Should have parameter Force of type System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } @@ -26,7 +26,7 @@ Describe "Get-DbatoolsConfig" { It "Returns proper information" { $results = Get-DbatoolsConfig -FullName sql.connection.timeout - $results.Value | Should -BeOfType [int] + $results.Value | Should -BeOfType [System.Int32] } } } diff --git a/tests/Get-DbatoolsConfigValue.Tests.ps1 b/tests/Get-DbatoolsConfigValue.Tests.ps1 index bf7d10d41b..5665d71b71 100644 --- a/tests/Get-DbatoolsConfigValue.Tests.ps1 +++ b/tests/Get-DbatoolsConfigValue.Tests.ps1 @@ -12,13 +12,13 @@ Describe "Get-DbatoolsConfigValue" { $CommandUnderTest = Get-Command Get-DbatoolsConfigValue } It "Should have FullName as a parameter" { - $CommandUnderTest | Should -HaveParameter FullName -Type String + $CommandUnderTest | Should -HaveParameter FullName -Type System.String } It "Should have Fallback as a parameter" { - $CommandUnderTest | Should -HaveParameter Fallback -Type Object + $CommandUnderTest | Should -HaveParameter Fallback -Type System.Object } It "Should have NotNull as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NotNull -Type Switch + $CommandUnderTest | Should -HaveParameter NotNull -Type System.Management.Automation.SwitchParameter } } diff --git a/tests/Get-DbatoolsLog.Tests.ps1 b/tests/Get-DbatoolsLog.Tests.ps1 index cf474344ec..d4a6058b9a 100644 --- a/tests/Get-DbatoolsLog.Tests.ps1 +++ b/tests/Get-DbatoolsLog.Tests.ps1 @@ -9,38 +9,38 @@ Describe "Get-DbatoolsLog" { BeforeAll { $CommandUnderTest = Get-Command Get-DbatoolsLog } - 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 ModuleName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ModuleName -Type String -Mandatory:$false + It "Should have ModuleName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter ModuleName -Type System.String -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 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 Last as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter Last -Type Int32 -Mandatory:$false + It "Should have Last as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter Last -Type System.Int32 -Mandatory:$false } - It "Should have LastError as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter LastError -Type Switch -Mandatory:$false + It "Should have LastError as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter LastError -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have Skip as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter Skip -Type Int32 -Mandatory:$false + It "Should have Skip as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter Skip -Type System.Int32 -Mandatory:$false } - It "Should have Runspace as a non-mandatory Guid parameter" { - $CommandUnderTest | Should -HaveParameter Runspace -Type Guid -Mandatory:$false + It "Should have Runspace as a non-mandatory System.Guid parameter" { + $CommandUnderTest | Should -HaveParameter Runspace -Type System.Guid -Mandatory:$false } - It "Should have Level as a non-mandatory MessageLevel[] parameter" { + It "Should have Level as a non-mandatory Dataplat.Dbatools.Message.MessageLevel[] parameter" { $CommandUnderTest | Should -HaveParameter Level -Type Dataplat.Dbatools.Message.MessageLevel[] -Mandatory:$false } - It "Should have Raw as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch -Mandatory:$false + It "Should have Raw as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Raw -Type System.Management.Automation.SwitchParameter -Mandatory:$false } - It "Should have Errors as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Errors -Type Switch -Mandatory:$false + It "Should have Errors as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Errors -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Get-DbatoolsPath.Tests.ps1 b/tests/Get-DbatoolsPath.Tests.ps1 index 951dbe3119..3432d8ba4a 100644 --- a/tests/Get-DbatoolsPath.Tests.ps1 +++ b/tests/Get-DbatoolsPath.Tests.ps1 @@ -10,7 +10,7 @@ Describe "Get-DbatoolsPath" { $CommandUnderTest = Get-Command Get-DbatoolsPath } It "Should have Name as a parameter" { - $CommandUnderTest | Should -HaveParameter Name -Type String + $CommandUnderTest | Should -HaveParameter Name -Type System.String } } } diff --git a/tests/Get-DirectoryRestoreFile.Tests.ps1 b/tests/Get-DirectoryRestoreFile.Tests.ps1 index 27406ac25b..8074237981 100644 --- a/tests/Get-DirectoryRestoreFile.Tests.ps1 +++ b/tests/Get-DirectoryRestoreFile.Tests.ps1 @@ -10,14 +10,14 @@ Describe "Get-DirectoryRestoreFile" { BeforeAll { $CommandUnderTest = Get-Command Get-DirectoryRestoreFile } - 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 Recurse as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Recurse -Type Switch -Mandatory:$false + It "Should have Recurse as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Recurse -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 } } @@ -38,7 +38,7 @@ Describe "Get-DirectoryRestoreFile" { $results = Get-DirectoryRestoreFile -Path TestDrive:\backups } - It "Should Return an array of FileInfo" { + It "Should Return an array of System.IO.FileSystemInfo" { $results | Should -BeOfType System.IO.FileSystemInfo } It "Should Return 3 files" { @@ -66,7 +66,7 @@ Describe "Get-DirectoryRestoreFile" { $results2 = Get-DirectoryRestoreFile -Path TestDrive:\backups -Recurse } - It "Should Return an array of FileInfo" { + It "Should Return an array of System.IO.FileSystemInfo" { $results2 | Should -BeOfType System.IO.FileSystemInfo } It "Should Return 4 files" { diff --git a/tests/Get-ObjectNameParts.Tests.ps1 b/tests/Get-ObjectNameParts.Tests.ps1 index 7330594354..7d66dd9e81 100644 --- a/tests/Get-ObjectNameParts.Tests.ps1 +++ b/tests/Get-ObjectNameParts.Tests.ps1 @@ -10,8 +10,8 @@ Describe "Get-ObjectNameParts" { BeforeAll { $CommandUnderTest = Get-Command Get-ObjectNameParts } - It "Should have ObjectName as a non-mandatory parameter of type String" { - $CommandUnderTest | Should -HaveParameter ObjectName -Type String -Mandatory:$false + It "Should have ObjectName as a non-mandatory parameter of type System.String" { + $CommandUnderTest | Should -HaveParameter ObjectName -Type System.String -Mandatory:$false } } diff --git a/tests/Get-SqlDefaultSpConfigure.Tests.ps1 b/tests/Get-SqlDefaultSpConfigure.Tests.ps1 index 13df1ed2ff..c29a4c220f 100644 --- a/tests/Get-SqlDefaultSpConfigure.Tests.ps1 +++ b/tests/Get-SqlDefaultSpConfigure.Tests.ps1 @@ -10,8 +10,8 @@ Describe "Get-SqlDefaultSPConfigure" { BeforeAll { $CommandUnderTest = Get-Command Get-SqlDefaultSPConfigure } - It "Should have SqlVersion as a non-mandatory parameter of type Object" { - $CommandUnderTest | Should -HaveParameter SqlVersion -Type Object -Mandatory:$false + It "Should have SqlVersion as a non-mandatory parameter of type System.Object" { + $CommandUnderTest | Should -HaveParameter SqlVersion -Type System.Object -Mandatory:$false } } diff --git a/tests/Get-XpDirTreeRestoreFile.Tests.ps1 b/tests/Get-XpDirTreeRestoreFile.Tests.ps1 index 89ff6c476a..ad9ddfa50a 100644 --- a/tests/Get-XpDirTreeRestoreFile.Tests.ps1 +++ b/tests/Get-XpDirTreeRestoreFile.Tests.ps1 @@ -10,7 +10,7 @@ Describe "Get-XpDirTreeRestoreFile" { $CommandUnderTest = Get-Command Get-XpDirTreeRestoreFile } 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 SqlInstance as a non-mandatory DbaInstanceParameter parameter" { $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false @@ -19,10 +19,10 @@ Describe "Get-XpDirTreeRestoreFile" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -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 } It "Should have NoRecurse as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter NoRecurse -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoRecurse -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } diff --git a/tests/Grant-DbaAgPermission.Tests.ps1 b/tests/Grant-DbaAgPermission.Tests.ps1 index 7f394a6b84..b10f1cc2b0 100644 --- a/tests/Grant-DbaAgPermission.Tests.ps1 +++ b/tests/Grant-DbaAgPermission.Tests.ps1 @@ -12,22 +12,22 @@ Describe "Grant-DbaAgPermission" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have Login as a parameter" { - $CommandUnderTest | Should -HaveParameter Login -Type String[] + $CommandUnderTest | Should -HaveParameter Login -Type Microsoft.SqlServer.Management.Smo.Login[] } It "Should have AvailabilityGroup as a parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -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 Permission as a parameter" { - $CommandUnderTest | Should -HaveParameter Permission -Type String[] + $CommandUnderTest | Should -HaveParameter Permission -Type System.String[] } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Login[] } 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/Import-DbaBinaryFile.Tests.ps1 b/tests/Import-DbaBinaryFile.Tests.ps1 index 4a5ef15e7b..71894f81cc 100644 --- a/tests/Import-DbaBinaryFile.Tests.ps1 +++ b/tests/Import-DbaBinaryFile.Tests.ps1 @@ -23,31 +23,31 @@ Describe "Import-DbaBinaryFile" { $CommandUnderTest = Get-Command Import-DbaBinaryFile } 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 Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String + $CommandUnderTest | Should -HaveParameter Table -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 Statement as a parameter" { - $CommandUnderTest | Should -HaveParameter Statement -Type String + $CommandUnderTest | Should -HaveParameter Statement -Type System.String } It "Should have FileNameColumn as a parameter" { - $CommandUnderTest | Should -HaveParameter FileNameColumn -Type String + $CommandUnderTest | Should -HaveParameter FileNameColumn -Type System.String } It "Should have BinaryColumn as a parameter" { - $CommandUnderTest | Should -HaveParameter BinaryColumn -Type String + $CommandUnderTest | Should -HaveParameter BinaryColumn -Type System.String } It "Should have NoFileNameColumn as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoFileNameColumn -Type Switch + $CommandUnderTest | Should -HaveParameter NoFileNameColumn -Type System.Management.Automation.SwitchParameter } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type [Microsoft.SqlServer.Management.Smo.Table[]] @@ -59,7 +59,7 @@ Describe "Import-DbaBinaryFile" { $CommandUnderTest | Should -HaveParameter Path -Type System.IO.FileInfo[] } 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/Import-DbaCsv.Tests.ps1 b/tests/Import-DbaCsv.Tests.ps1 index 0b8c414e60..e2df30e8d5 100644 --- a/tests/Import-DbaCsv.Tests.ps1 +++ b/tests/Import-DbaCsv.Tests.ps1 @@ -22,115 +22,115 @@ Describe "Import-DbaCsv" { $CommandUnderTest = Get-Command Import-DbaCsv } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -Type System.Object[] -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 Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Database -Type System.String -Mandatory:$false } It "Should have Table parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -Type System.String -Mandatory:$false } It "Should have Schema parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Schema -Type System.String -Mandatory:$false } It "Should have Truncate parameter" { - $CommandUnderTest | Should -HaveParameter Truncate -Type Switch + $CommandUnderTest | Should -HaveParameter Truncate -Type System.Management.Automation.SwitchParameter } It "Should have Delimiter parameter" { - $CommandUnderTest | Should -HaveParameter Delimiter -Type Char -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Delimiter -Type System.Char -Mandatory:$false } It "Should have SingleColumn parameter" { - $CommandUnderTest | Should -HaveParameter SingleColumn -Type Switch + $CommandUnderTest | Should -HaveParameter SingleColumn -Type System.Management.Automation.SwitchParameter } It "Should have BatchSize parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 -Mandatory:$false } It "Should have NotifyAfter parameter" { - $CommandUnderTest | Should -HaveParameter NotifyAfter -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NotifyAfter -Type System.Int32 -Mandatory:$false } It "Should have TableLock parameter" { - $CommandUnderTest | Should -HaveParameter TableLock -Type Switch + $CommandUnderTest | Should -HaveParameter TableLock -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 Column parameter" { - $CommandUnderTest | Should -HaveParameter Column -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Column -Type System.String[] -Mandatory:$false } It "Should have ColumnMap parameter" { - $CommandUnderTest | Should -HaveParameter ColumnMap -Type Hashtable -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ColumnMap -Type System.Collections.Hashtable -Mandatory:$false } It "Should have KeepOrdinalOrder parameter" { - $CommandUnderTest | Should -HaveParameter KeepOrdinalOrder -Type Switch + $CommandUnderTest | Should -HaveParameter KeepOrdinalOrder -Type System.Management.Automation.SwitchParameter } It "Should have AutoCreateTable parameter" { - $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type Switch + $CommandUnderTest | Should -HaveParameter AutoCreateTable -Type System.Management.Automation.SwitchParameter } It "Should have NoProgress parameter" { - $CommandUnderTest | Should -HaveParameter NoProgress -Type Switch + $CommandUnderTest | Should -HaveParameter NoProgress -Type System.Management.Automation.SwitchParameter } It "Should have NoHeaderRow parameter" { - $CommandUnderTest | Should -HaveParameter NoHeaderRow -Type Switch + $CommandUnderTest | Should -HaveParameter NoHeaderRow -Type System.Management.Automation.SwitchParameter } It "Should have UseFileNameForSchema parameter" { - $CommandUnderTest | Should -HaveParameter UseFileNameForSchema -Type Switch + $CommandUnderTest | Should -HaveParameter UseFileNameForSchema -Type System.Management.Automation.SwitchParameter } It "Should have Quote parameter" { - $CommandUnderTest | Should -HaveParameter Quote -Type Char -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Quote -Type System.Char -Mandatory:$false } It "Should have Escape parameter" { - $CommandUnderTest | Should -HaveParameter Escape -Type Char -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Escape -Type System.Char -Mandatory:$false } It "Should have Comment parameter" { - $CommandUnderTest | Should -HaveParameter Comment -Type Char -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Comment -Type System.Char -Mandatory:$false } It "Should have TrimmingOption parameter" { - $CommandUnderTest | Should -HaveParameter TrimmingOption -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter TrimmingOption -Type System.String -Mandatory:$false } It "Should have BufferSize parameter" { - $CommandUnderTest | Should -HaveParameter BufferSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BufferSize -Type System.Int32 -Mandatory:$false } It "Should have ParseErrorAction parameter" { - $CommandUnderTest | Should -HaveParameter ParseErrorAction -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ParseErrorAction -Type System.String -Mandatory:$false } It "Should have Encoding parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Encoding -Type System.String -Mandatory:$false } It "Should have NullValue parameter" { - $CommandUnderTest | Should -HaveParameter NullValue -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NullValue -Type System.String -Mandatory:$false } It "Should have MaxQuotedFieldLength parameter" { - $CommandUnderTest | Should -HaveParameter MaxQuotedFieldLength -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxQuotedFieldLength -Type System.Int32 -Mandatory:$false } It "Should have SkipEmptyLine parameter" { - $CommandUnderTest | Should -HaveParameter SkipEmptyLine -Type Switch + $CommandUnderTest | Should -HaveParameter SkipEmptyLine -Type System.Management.Automation.SwitchParameter } It "Should have SupportsMultiline parameter" { - $CommandUnderTest | Should -HaveParameter SupportsMultiline -Type Switch + $CommandUnderTest | Should -HaveParameter SupportsMultiline -Type System.Management.Automation.SwitchParameter } It "Should have UseColumnDefault parameter" { - $CommandUnderTest | Should -HaveParameter UseColumnDefault -Type Switch + $CommandUnderTest | Should -HaveParameter UseColumnDefault -Type System.Management.Automation.SwitchParameter } It "Should have NoTransaction parameter" { - $CommandUnderTest | Should -HaveParameter NoTransaction -Type Switch + $CommandUnderTest | Should -HaveParameter NoTransaction -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/Import-DbaPfDataCollectorSetTemplate.Tests.ps1 b/tests/Import-DbaPfDataCollectorSetTemplate.Tests.ps1 index d9a9a4bee3..61ff197624 100644 --- a/tests/Import-DbaPfDataCollectorSetTemplate.Tests.ps1 +++ b/tests/Import-DbaPfDataCollectorSetTemplate.Tests.ps1 @@ -6,64 +6,64 @@ Describe "Import-DbaPfDataCollectorSetTemplate" { $CommandUnderTest = Get-Command Import-DbaPfDataCollectorSetTemplate } 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 DisplayName as a parameter" { - $CommandUnderTest | Should -HaveParameter DisplayName -Type String + $CommandUnderTest | Should -HaveParameter DisplayName -Type System.String } It "Should have SchedulesEnabled as a switch parameter" { - $CommandUnderTest | Should -HaveParameter SchedulesEnabled -Type Switch + $CommandUnderTest | Should -HaveParameter SchedulesEnabled -Type System.Management.Automation.SwitchParameter } It "Should have RootPath as a parameter" { - $CommandUnderTest | Should -HaveParameter RootPath -Type String + $CommandUnderTest | Should -HaveParameter RootPath -Type System.String } It "Should have Segment as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Segment -Type Switch + $CommandUnderTest | Should -HaveParameter Segment -Type System.Management.Automation.SwitchParameter } It "Should have SegmentMaxDuration as a parameter" { - $CommandUnderTest | Should -HaveParameter SegmentMaxDuration -Type Int32 + $CommandUnderTest | Should -HaveParameter SegmentMaxDuration -Type System.Int32 } It "Should have SegmentMaxSize as a parameter" { - $CommandUnderTest | Should -HaveParameter SegmentMaxSize -Type Int32 + $CommandUnderTest | Should -HaveParameter SegmentMaxSize -Type System.Int32 } It "Should have Subdirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter Subdirectory -Type String + $CommandUnderTest | Should -HaveParameter Subdirectory -Type System.String } It "Should have SubdirectoryFormat as a parameter" { - $CommandUnderTest | Should -HaveParameter SubdirectoryFormat -Type Int32 + $CommandUnderTest | Should -HaveParameter SubdirectoryFormat -Type System.Int32 } It "Should have SubdirectoryFormatPattern as a parameter" { - $CommandUnderTest | Should -HaveParameter SubdirectoryFormatPattern -Type String + $CommandUnderTest | Should -HaveParameter SubdirectoryFormatPattern -Type System.String } It "Should have Task as a parameter" { - $CommandUnderTest | Should -HaveParameter Task -Type String + $CommandUnderTest | Should -HaveParameter Task -Type System.String } It "Should have TaskRunAsSelf as a switch parameter" { - $CommandUnderTest | Should -HaveParameter TaskRunAsSelf -Type Switch + $CommandUnderTest | Should -HaveParameter TaskRunAsSelf -Type System.Management.Automation.SwitchParameter } It "Should have TaskArguments as a parameter" { - $CommandUnderTest | Should -HaveParameter TaskArguments -Type String + $CommandUnderTest | Should -HaveParameter TaskArguments -Type System.String } It "Should have TaskUserTextArguments as a parameter" { - $CommandUnderTest | Should -HaveParameter TaskUserTextArguments -Type String + $CommandUnderTest | Should -HaveParameter TaskUserTextArguments -Type System.String } It "Should have StopOnCompletion as a switch parameter" { - $CommandUnderTest | Should -HaveParameter StopOnCompletion -Type Switch + $CommandUnderTest | Should -HaveParameter StopOnCompletion -Type System.Management.Automation.SwitchParameter } It "Should have Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String[] + $CommandUnderTest | Should -HaveParameter Path -Type System.String[] } It "Should have Template as a parameter" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] + $CommandUnderTest | Should -HaveParameter Template -Type System.String[] } It "Should have Instance as a parameter" { - $CommandUnderTest | Should -HaveParameter Instance -Type String[] + $CommandUnderTest | Should -HaveParameter Instance -Type System.String[] } 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/Import-DbaRegServer.Tests.ps1 b/tests/Import-DbaRegServer.Tests.ps1 index afc005d4cf..df0b6bb0e5 100644 --- a/tests/Import-DbaRegServer.Tests.ps1 +++ b/tests/Import-DbaRegServer.Tests.ps1 @@ -18,16 +18,16 @@ Describe "Import-DbaRegServer" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential -Mandatory:$false } It "Should have Path parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Path -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 Group parameter" { - $CommandUnderTest | Should -HaveParameter Group -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Group -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/Import-DbaSpConfigure.Tests.ps1 b/tests/Import-DbaSpConfigure.Tests.ps1 index 87c97797ac..6cbd836987 100644 --- a/tests/Import-DbaSpConfigure.Tests.ps1 +++ b/tests/Import-DbaSpConfigure.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Import-DbaSpConfigure" { $CommandUnderTest = Get-Command Import-DbaSpConfigure } 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 Destination as a parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Destination -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 DestinationSqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationSqlCredential -Type System.Management.Automation.PSCredential } 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 Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String + $CommandUnderTest | Should -HaveParameter Path -Type System.String } 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 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/Import-DbaXESessionTemplate.Tests.ps1 b/tests/Import-DbaXESessionTemplate.Tests.ps1 index ab6d96235d..b8b8dbb8fd 100644 --- a/tests/Import-DbaXESessionTemplate.Tests.ps1 +++ b/tests/Import-DbaXESessionTemplate.Tests.ps1 @@ -18,25 +18,25 @@ Describe "Import-DbaXESessionTemplate" { $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 Path as a parameter" { - $CommandUnderTest | Should -HaveParameter Path -Type String[] + $CommandUnderTest | Should -HaveParameter Path -Type System.String[] } It "Should have Template as a parameter" { - $CommandUnderTest | Should -HaveParameter Template -Type String[] + $CommandUnderTest | Should -HaveParameter Template -Type System.String[] } It "Should have TargetFilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter TargetFilePath -Type String + $CommandUnderTest | Should -HaveParameter TargetFilePath -Type System.String } It "Should have TargetFileMetadataPath as a parameter" { - $CommandUnderTest | Should -HaveParameter TargetFileMetadataPath -Type String + $CommandUnderTest | Should -HaveParameter TargetFileMetadataPath -Type System.String } It "Should have StartUpState as a parameter" { - $CommandUnderTest | Should -HaveParameter StartUpState -Type String + $CommandUnderTest | Should -HaveParameter StartUpState -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/Import-DbatoolsConfig.Tests.ps1 b/tests/Import-DbatoolsConfig.Tests.ps1 index be250f4a83..c8af7646f3 100644 --- a/tests/Import-DbatoolsConfig.Tests.ps1 +++ b/tests/Import-DbatoolsConfig.Tests.ps1 @@ -11,29 +11,29 @@ Describe "Import-DbatoolsConfig" { BeforeAll { $CommandUnderTest = Get-Command Import-DbatoolsConfig } - 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 ModuleName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ModuleName -Type String -Mandatory:$false + It "Should have ModuleName as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter ModuleName -Type System.String -Mandatory:$false } - It "Should have ModuleVersion as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter ModuleVersion -Type Int32 -Mandatory:$false + It "Should have ModuleVersion as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter ModuleVersion -Type System.Int32 -Mandatory:$false } - It "Should have Scope as a non-mandatory ConfigScope parameter" { - $CommandUnderTest | Should -HaveParameter Scope -Type ConfigScope -Mandatory:$false + It "Should have Scope as a non-mandatory Dataplat.Dbatools.Configuration.ConfigScope parameter" { + $CommandUnderTest | Should -HaveParameter Scope -Type Dataplat.Dbatools.Configuration.ConfigScope -Mandatory:$false } - It "Should have IncludeFilter as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter IncludeFilter -Type String[] -Mandatory:$false + It "Should have IncludeFilter as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter IncludeFilter -Type System.String[] -Mandatory:$false } - It "Should have ExcludeFilter as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeFilter -Type String[] -Mandatory:$false + It "Should have ExcludeFilter as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter ExcludeFilter -Type System.String[] -Mandatory:$false } - It "Should have Peek as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Peek -Type Switch -Mandatory:$false + It "Should have Peek as a non-mandatory System.Management.Automation.SwitchParameter" { + $CommandUnderTest | Should -HaveParameter Peek -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/InModule.Help.Tests.ps1 b/tests/InModule.Help.Tests.ps1 index 277981cc47..d7ed83c3bc 100644 --- a/tests/InModule.Help.Tests.ps1 +++ b/tests/InModule.Help.Tests.ps1 @@ -63,7 +63,7 @@ foreach ($command in $commands) { } $testhelpall += 1 - if ([String]::IsNullOrEmpty($Help.Description.Text)) { + if ([System.String]::IsNullOrEmpty($Help.Description.Text)) { # Should be a description for every function It "gets description for $commandName" { $Help.Description | Should Not BeNullOrEmpty @@ -72,7 +72,7 @@ foreach ($command in $commands) { } $testhelpall += 1 - if ([String]::IsNullOrEmpty(($Help.Examples.Example | Select-Object -First 1).Code)) { + if ([System.String]::IsNullOrEmpty(($Help.Examples.Example | Select-Object -First 1).Code)) { # Should be at least one example It "gets example code from $commandName" { ($Help.Examples.Example | Select-Object -First 1).Code | Should Not BeNullOrEmpty @@ -81,7 +81,7 @@ foreach ($command in $commands) { } $testhelpall += 1 - if ([String]::IsNullOrEmpty(($Help.Examples.Example.Remarks | Select-Object -First 1).Text)) { + if ([System.String]::IsNullOrEmpty(($Help.Examples.Example.Remarks | Select-Object -First 1).Text)) { # Should be at least one example description It "gets example help from $commandName" { ($Help.Examples.Example.Remarks | Select-Object -First 1).Text | Should Not BeNullOrEmpty @@ -128,7 +128,7 @@ foreach ($command in $commands) { $parameterHelp = $Help.parameters.parameter | Where-Object Name -EQ $parameterName $testparamsall += 1 - if ([String]::IsNullOrEmpty($parameterHelp.Description.Text)) { + if ([System.String]::IsNullOrEmpty($parameterHelp.Description.Text)) { # Should be a description for every parameter It "gets help for parameter: $parameterName : in $commandName" { $parameterHelp.Description.Text | Should Not BeNullOrEmpty @@ -200,4 +200,4 @@ foreach ($command in $commands) { } } } -} \ No newline at end of file +} diff --git a/tests/Install-DbaAgentAdminAlert.Tests.ps1 b/tests/Install-DbaAgentAdminAlert.Tests.ps1 index 7a0dfd61e5..8afa9857b1 100644 --- a/tests/Install-DbaAgentAdminAlert.Tests.ps1 +++ b/tests/Install-DbaAgentAdminAlert.Tests.ps1 @@ -11,52 +11,52 @@ Describe "Install-DbaAgentAdminAlert" { $CommandUnderTest = Get-Command Install-DbaAgentAdminAlert } 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 SqlCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential } It "Should have Category as a parameter" { - $CommandUnderTest | Should -HaveParameter Category -Type String + $CommandUnderTest | Should -HaveParameter Category -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 Operator as a parameter" { - $CommandUnderTest | Should -HaveParameter Operator -Type String + $CommandUnderTest | Should -HaveParameter Operator -Type System.String } It "Should have OperatorEmail as a parameter" { - $CommandUnderTest | Should -HaveParameter OperatorEmail -Type String + $CommandUnderTest | Should -HaveParameter OperatorEmail -Type System.String } It "Should have DelayBetweenResponses as a parameter" { - $CommandUnderTest | Should -HaveParameter DelayBetweenResponses -Type Int32 + $CommandUnderTest | Should -HaveParameter DelayBetweenResponses -Type System.Int32 } It "Should have Disabled as a parameter" { - $CommandUnderTest | Should -HaveParameter Disabled -Type Switch + $CommandUnderTest | Should -HaveParameter Disabled -Type System.Management.Automation.SwitchParameter } It "Should have EventDescriptionKeyword as a parameter" { - $CommandUnderTest | Should -HaveParameter EventDescriptionKeyword -Type String + $CommandUnderTest | Should -HaveParameter EventDescriptionKeyword -Type System.String } It "Should have EventSource as a parameter" { - $CommandUnderTest | Should -HaveParameter EventSource -Type String + $CommandUnderTest | Should -HaveParameter EventSource -Type System.String } It "Should have JobId as a parameter" { - $CommandUnderTest | Should -HaveParameter JobId -Type String + $CommandUnderTest | Should -HaveParameter JobId -Type System.String } It "Should have ExcludeSeverity as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeSeverity -Type Int32[] + $CommandUnderTest | Should -HaveParameter ExcludeSeverity -Type System.Int32[] } It "Should have ExcludeMessageId as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeMessageId -Type Int32[] + $CommandUnderTest | Should -HaveParameter ExcludeMessageId -Type System.Int32[] } It "Should have NotificationMessage as a parameter" { - $CommandUnderTest | Should -HaveParameter NotificationMessage -Type String + $CommandUnderTest | Should -HaveParameter NotificationMessage -Type System.String } It "Should have NotifyMethod as a parameter" { - $CommandUnderTest | Should -HaveParameter NotifyMethod -Type String + $CommandUnderTest | Should -HaveParameter NotifyMethod -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/Install-DbaDarlingData.Tests.ps1 b/tests/Install-DbaDarlingData.Tests.ps1 index d5039c9b93..f72c355be4 100644 --- a/tests/Install-DbaDarlingData.Tests.ps1 +++ b/tests/Install-DbaDarlingData.Tests.ps1 @@ -6,28 +6,28 @@ Describe "Install-DbaDarlingData" { $CommandUnderTest = Get-Command Install-DbaDarlingData } 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 Microsoft.SqlServer.Management.Smo.Database } It "Should have Branch as a parameter" { - $CommandUnderTest | Should -HaveParameter Branch -Type String + $CommandUnderTest | Should -HaveParameter Branch -Type System.String } It "Should have Procedure as a parameter" { - $CommandUnderTest | Should -HaveParameter Procedure -Type String[] + $CommandUnderTest | Should -HaveParameter Procedure -Type System.String[] } It "Should have LocalFile as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String + $CommandUnderTest | Should -HaveParameter LocalFile -Type System.String } 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/Install-DbaFirstResponderKit.Tests.ps1 b/tests/Install-DbaFirstResponderKit.Tests.ps1 index a05184898b..cceeeb4f29 100644 --- a/tests/Install-DbaFirstResponderKit.Tests.ps1 +++ b/tests/Install-DbaFirstResponderKit.Tests.ps1 @@ -10,28 +10,28 @@ Describe "Install-DbaFirstResponderKit" { $CommandUnderTest = Get-Command Install-DbaFirstResponderKit } 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 Branch parameter" { - $CommandUnderTest | Should -HaveParameter Branch -Type String + $CommandUnderTest | Should -HaveParameter Branch -Type System.String } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object + $CommandUnderTest | Should -HaveParameter Database -Type System.Object } It "Should have LocalFile parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String + $CommandUnderTest | Should -HaveParameter LocalFile -Type System.String } It "Should have OnlyScript parameter" { - $CommandUnderTest | Should -HaveParameter OnlyScript -Type String[] + $CommandUnderTest | Should -HaveParameter OnlyScript -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/Install-DbaInstance.Tests.ps1 b/tests/Install-DbaInstance.Tests.ps1 index e52e65dfae..1bf2ce5139 100644 --- a/tests/Install-DbaInstance.Tests.ps1 +++ b/tests/Install-DbaInstance.Tests.ps1 @@ -29,109 +29,109 @@ Describe "Install-DbaInstance" { $command = Get-Command -Name Install-DbaInstance } 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 Version parameter" { - $command | Should -HaveParameter Version -Type String -Mandatory:$false + $command | Should -HaveParameter Version -Type System.String -Mandatory:$false } It "Should have InstanceName parameter" { - $command | Should -HaveParameter InstanceName -Type String -Mandatory:$false + $command | Should -HaveParameter InstanceName -Type System.String -Mandatory:$false } It "Should have SaCredential parameter" { - $command | Should -HaveParameter SaCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter SaCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Credential parameter" { - $command | Should -HaveParameter Credential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter Credential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have Authentication parameter" { - $command | Should -HaveParameter Authentication -Type String -Mandatory:$false + $command | Should -HaveParameter Authentication -Type System.String -Mandatory:$false } It "Should have ConfigurationFile parameter" { - $command | Should -HaveParameter ConfigurationFile -Type Object -Mandatory:$false + $command | Should -HaveParameter ConfigurationFile -Type System.Object -Mandatory:$false } It "Should have Configuration parameter" { - $command | Should -HaveParameter Configuration -Type Hashtable -Mandatory:$false + $command | Should -HaveParameter Configuration -Type System.Collections.Hashtable -Mandatory:$false } It "Should have Path parameter" { - $command | Should -HaveParameter Path -Type String[] -Mandatory:$false + $command | Should -HaveParameter Path -Type System.String[] -Mandatory:$false } It "Should have Feature parameter" { - $command | Should -HaveParameter Feature -Type String[] -Mandatory:$false + $command | Should -HaveParameter Feature -Type System.String[] -Mandatory:$false } It "Should have AuthenticationMode parameter" { - $command | Should -HaveParameter AuthenticationMode -Type String -Mandatory:$false + $command | Should -HaveParameter AuthenticationMode -Type System.String -Mandatory:$false } It "Should have InstancePath parameter" { - $command | Should -HaveParameter InstancePath -Type String -Mandatory:$false + $command | Should -HaveParameter InstancePath -Type System.String -Mandatory:$false } It "Should have DataPath parameter" { - $command | Should -HaveParameter DataPath -Type String -Mandatory:$false + $command | Should -HaveParameter DataPath -Type System.String -Mandatory:$false } It "Should have LogPath parameter" { - $command | Should -HaveParameter LogPath -Type String -Mandatory:$false + $command | Should -HaveParameter LogPath -Type System.String -Mandatory:$false } It "Should have TempPath parameter" { - $command | Should -HaveParameter TempPath -Type String -Mandatory:$false + $command | Should -HaveParameter TempPath -Type System.String -Mandatory:$false } It "Should have BackupPath parameter" { - $command | Should -HaveParameter BackupPath -Type String -Mandatory:$false + $command | Should -HaveParameter BackupPath -Type System.String -Mandatory:$false } It "Should have UpdateSourcePath parameter" { - $command | Should -HaveParameter UpdateSourcePath -Type String -Mandatory:$false + $command | Should -HaveParameter UpdateSourcePath -Type System.String -Mandatory:$false } It "Should have AdminAccount parameter" { - $command | Should -HaveParameter AdminAccount -Type String[] -Mandatory:$false + $command | Should -HaveParameter AdminAccount -Type System.String[] -Mandatory:$false } It "Should have Port parameter" { - $command | Should -HaveParameter Port -Type Int32 -Mandatory:$false + $command | Should -HaveParameter Port -Type System.Int32 -Mandatory:$false } It "Should have Throttle parameter" { - $command | Should -HaveParameter Throttle -Type Int32 -Mandatory:$false + $command | Should -HaveParameter Throttle -Type System.Int32 -Mandatory:$false } It "Should have ProductID parameter" { - $command | Should -HaveParameter ProductID -Type String -Mandatory:$false + $command | Should -HaveParameter ProductID -Type System.String -Mandatory:$false } It "Should have AsCollation parameter" { - $command | Should -HaveParameter AsCollation -Type String -Mandatory:$false + $command | Should -HaveParameter AsCollation -Type System.String -Mandatory:$false } It "Should have SqlCollation parameter" { - $command | Should -HaveParameter SqlCollation -Type String -Mandatory:$false + $command | Should -HaveParameter SqlCollation -Type System.String -Mandatory:$false } It "Should have EngineCredential parameter" { - $command | Should -HaveParameter EngineCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter EngineCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have AgentCredential parameter" { - $command | Should -HaveParameter AgentCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter AgentCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have ASCredential parameter" { - $command | Should -HaveParameter ASCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter ASCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have ISCredential parameter" { - $command | Should -HaveParameter ISCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter ISCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have RSCredential parameter" { - $command | Should -HaveParameter RSCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter RSCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have FTCredential parameter" { - $command | Should -HaveParameter FTCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter FTCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have PBEngineCredential parameter" { - $command | Should -HaveParameter PBEngineCredential -Type PSCredential -Mandatory:$false + $command | Should -HaveParameter PBEngineCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have SaveConfiguration parameter" { - $command | Should -HaveParameter SaveConfiguration -Type String -Mandatory:$false + $command | Should -HaveParameter SaveConfiguration -Type System.String -Mandatory:$false } It "Should have PerformVolumeMaintenanceTasks parameter" { - $command | Should -HaveParameter PerformVolumeMaintenanceTasks -Type Switch -Mandatory:$false + $command | Should -HaveParameter PerformVolumeMaintenanceTasks -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have Restart parameter" { - $command | Should -HaveParameter Restart -Type Switch -Mandatory:$false + $command | Should -HaveParameter Restart -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoPendingRenameCheck parameter" { - $command | Should -HaveParameter NoPendingRenameCheck -Type Switch -Mandatory:$false + $command | Should -HaveParameter NoPendingRenameCheck -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 } } @@ -349,7 +349,7 @@ Describe "Install-DbaInstance" { $result.Notes | Should -BeLike '*Installation failed with exit code 12345*' $warVar | Should -BeLike '*Installation failed with exit code 12345*' #revert default mock - Mock -CommandName Invoke-Program -MockWith { [pscustomobject]@{ Successful = $true; ExitCode = 0 } } -ModuleName $ModuleName + Mock -CommandName Invoke-Program -MockWith { [pscustomobject]@{ Successful = $true; ExitCode = 0 } -ModuleName $ModuleName } } } diff --git a/tests/Install-DbaMaintenanceSolution.Tests.ps1 b/tests/Install-DbaMaintenanceSolution.Tests.ps1 index c07b80ee1d..a73e24202d 100644 --- a/tests/Install-DbaMaintenanceSolution.Tests.ps1 +++ b/tests/Install-DbaMaintenanceSolution.Tests.ps1 @@ -10,52 +10,52 @@ Describe "Install-DbaMaintenanceSolution" { $CommandUnderTest = Get-Command Install-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 BackupLocation parameter" { - $CommandUnderTest | Should -HaveParameter BackupLocation -Type String + $CommandUnderTest | Should -HaveParameter BackupLocation -Type System.String } It "Should have CleanupTime parameter" { - $CommandUnderTest | Should -HaveParameter CleanupTime -Type Int32 + $CommandUnderTest | Should -HaveParameter CleanupTime -Type System.Int32 } It "Should have OutputFileDirectory parameter" { - $CommandUnderTest | Should -HaveParameter OutputFileDirectory -Type String + $CommandUnderTest | Should -HaveParameter OutputFileDirectory -Type System.String } It "Should have ReplaceExisting parameter" { - $CommandUnderTest | Should -HaveParameter ReplaceExisting -Type Switch + $CommandUnderTest | Should -HaveParameter ReplaceExisting -Type System.Management.Automation.SwitchParameter } It "Should have LogToTable parameter" { - $CommandUnderTest | Should -HaveParameter LogToTable -Type Switch + $CommandUnderTest | Should -HaveParameter LogToTable -Type System.Management.Automation.SwitchParameter } It "Should have Solution parameter" { - $CommandUnderTest | Should -HaveParameter Solution -Type String[] + $CommandUnderTest | Should -HaveParameter Solution -Type System.String[] } It "Should have InstallJobs parameter" { - $CommandUnderTest | Should -HaveParameter InstallJobs -Type Switch + $CommandUnderTest | Should -HaveParameter InstallJobs -Type System.Management.Automation.SwitchParameter } It "Should have AutoScheduleJobs parameter" { - $CommandUnderTest | Should -HaveParameter AutoScheduleJobs -Type String[] + $CommandUnderTest | Should -HaveParameter AutoScheduleJobs -Type System.String[] } It "Should have StartTime parameter" { - $CommandUnderTest | Should -HaveParameter StartTime -Type String + $CommandUnderTest | Should -HaveParameter StartTime -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 InstallParallel parameter" { - $CommandUnderTest | Should -HaveParameter InstallParallel -Type Switch + $CommandUnderTest | Should -HaveParameter InstallParallel -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/Install-DbaMultiTool.Tests.ps1 b/tests/Install-DbaMultiTool.Tests.ps1 index 05270c28ba..8c0321c2a6 100644 --- a/tests/Install-DbaMultiTool.Tests.ps1 +++ b/tests/Install-DbaMultiTool.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Install-DbaMultiTool" { $CommandUnderTest = Get-Command Install-DbaMultiTool } 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 Branch parameter" { - $CommandUnderTest | Should -HaveParameter Branch -Type String + $CommandUnderTest | Should -HaveParameter Branch -Type System.String } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type Object + $CommandUnderTest | Should -HaveParameter Database -Type System.Object } 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/Install-DbaSqlWatch.Tests.ps1 b/tests/Install-DbaSqlWatch.Tests.ps1 index 9efbeb6109..5538dac6cf 100644 --- a/tests/Install-DbaSqlWatch.Tests.ps1 +++ b/tests/Install-DbaSqlWatch.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Install-DbaSqlWatch" { $CommandUnderTest = Get-Command Install-DbaSqlWatch } 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 LocalFile as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String + $CommandUnderTest | Should -HaveParameter LocalFile -Type System.String } It "Should have PreRelease as a switch parameter" { - $CommandUnderTest | Should -HaveParameter PreRelease -Type Switch + $CommandUnderTest | Should -HaveParameter PreRelease -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/Install-DbaWhoIsActive.Tests.ps1 b/tests/Install-DbaWhoIsActive.Tests.ps1 index 8330a1530d..f0310d59ba 100644 --- a/tests/Install-DbaWhoIsActive.Tests.ps1 +++ b/tests/Install-DbaWhoIsActive.Tests.ps1 @@ -91,8 +91,8 @@ ALTER PROC dbo.sp_WhoIsActive --If a SQL Agent job is running, an subnode called agent_info will be populated with some or all of --the following: job_id, job_name, step_id, step_name, msdb_query_error (in the event of an error) -- - --If @get_task_info is set to 2 and a lock wait is detected, a subnode called block_info will be - --populated with some or all of the following: lock_type, database_name, object_id, file_id, hobt_id, + --If @get_task_info is set to 2 and a lock wait is detected, a subnode called block_info will + --be populated with some or all of the following: lock_type, database_name, object_id, file_id, hobt_id, --applock_hash, metadata_resource, metadata_class_id, object_name, schema_name @get_additional_info BIT = 0, @@ -184,32 +184,32 @@ ALTER PROC dbo.sp_WhoIsActive } It "Should have SqlInstance parameter" { $ParameterList['SqlInstance'] | Should -Not -BeNullOrEmpty - $ParameterList['SqlInstance'].ParameterType.Name | Should -Be 'DbaInstanceParameter[]' + $ParameterList['SqlInstance'].ParameterType.FullName | Should -Be 'Dataplat.Dbatools.Parameter.DbaInstanceParameter[]' $ParameterList['SqlInstance'].IsMandatory | Should -Be $false } It "Should have SqlCredential parameter" { $ParameterList['SqlCredential'] | Should -Not -BeNullOrEmpty - $ParameterList['SqlCredential'].ParameterType.Name | Should -Be 'PSCredential' + $ParameterList['SqlCredential'].ParameterType.FullName | Should -Be 'System.Management.Automation.PSCredential' $ParameterList['SqlCredential'].IsMandatory | Should -Be $false } It "Should have LocalFile parameter" { $ParameterList['LocalFile'] | Should -Not -BeNullOrEmpty - $ParameterList['LocalFile'].ParameterType.Name | Should -Be 'String' + $ParameterList['LocalFile'].ParameterType.FullName | Should -Be 'System.String' $ParameterList['LocalFile'].IsMandatory | Should -Be $false } It "Should have Database parameter" { $ParameterList['Database'] | Should -Not -BeNullOrEmpty - $ParameterList['Database'].ParameterType.Name | Should -Be 'Object' + $ParameterList['Database'].ParameterType.FullName | Should -Be 'System.Object' $ParameterList['Database'].IsMandatory | Should -Be $false } It "Should have EnableException parameter" { $ParameterList['EnableException'] | Should -Not -BeNullOrEmpty - $ParameterList['EnableException'].ParameterType.Name | Should -Be 'Switch' + $ParameterList['EnableException'].ParameterType.FullName | Should -Be 'System.Management.Automation.SwitchParameter' $ParameterList['EnableException'].IsMandatory | Should -Be $false } It "Should have Force parameter" { $ParameterList['Force'] | Should -Not -BeNullOrEmpty - $ParameterList['Force'].ParameterType.Name | Should -Be 'Switch' + $ParameterList['Force'].ParameterType.FullName | Should -Be 'System.Management.Automation.SwitchParameter' $ParameterList['Force'].IsMandatory | Should -Be $false } } diff --git a/tests/Invoke-DbaAdvancedInstall.Tests.ps1 b/tests/Invoke-DbaAdvancedInstall.Tests.ps1 index fff0fbe725..1760a1e339 100644 --- a/tests/Invoke-DbaAdvancedInstall.Tests.ps1 +++ b/tests/Invoke-DbaAdvancedInstall.Tests.ps1 @@ -33,52 +33,52 @@ Describe "Invoke-DbaAdvancedInstall" { $CommandUnderTest = Get-Command Invoke-DbaAdvancedInstall } It "Should have ComputerName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.String -Mandatory:$false } It "Should have InstanceName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter InstanceName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InstanceName -Type System.String -Mandatory:$false } It "Should have Port as a non-mandatory Nullable`1 parameter" { - $CommandUnderTest | Should -HaveParameter Port -Type ([Nullable`1]) -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Port -Type ([System.Nullable`1]) -Mandatory:$false } It "Should have InstallationPath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter InstallationPath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InstallationPath -Type System.String -Mandatory:$false } It "Should have ConfigurationPath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ConfigurationPath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ConfigurationPath -Type System.String -Mandatory:$false } It "Should have ArgumentList as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter ArgumentList -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ArgumentList -Type System.String[] -Mandatory:$false } It "Should have Version as a non-mandatory Version parameter" { - $CommandUnderTest | Should -HaveParameter Version -Type Version -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Version -Type System.Version -Mandatory:$false } It "Should have Configuration as a non-mandatory Hashtable parameter" { - $CommandUnderTest | Should -HaveParameter Configuration -Type Hashtable -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Configuration -Type System.Collections.Hashtable -Mandatory:$false } It "Should have Restart as a non-mandatory Boolean parameter" { - $CommandUnderTest | Should -HaveParameter Restart -Type Boolean -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Restart -Type System.Boolean -Mandatory:$false } It "Should have PerformVolumeMaintenanceTasks as a non-mandatory Boolean parameter" { - $CommandUnderTest | Should -HaveParameter PerformVolumeMaintenanceTasks -Type Boolean -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PerformVolumeMaintenanceTasks -Type System.Boolean -Mandatory:$false } It "Should have SaveConfiguration as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter SaveConfiguration -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SaveConfiguration -Type System.String -Mandatory:$false } It "Should have Authentication as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Authentication -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Authentication -Type System.String -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 SaCredential as a non-mandatory PSCredential parameter" { - $CommandUnderTest | Should -HaveParameter SaCredential -Type PSCredential -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SaCredential -Type System.Management.Automation.PSCredential -Mandatory:$false } It "Should have NoPendingRenameCheck as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter NoPendingRenameCheck -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPendingRenameCheck -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/Invoke-DbaAdvancedRestore.Tests.ps1 b/tests/Invoke-DbaAdvancedRestore.Tests.ps1 index 55fd65577a..5f309f284e 100644 --- a/tests/Invoke-DbaAdvancedRestore.Tests.ps1 +++ b/tests/Invoke-DbaAdvancedRestore.Tests.ps1 @@ -12,70 +12,70 @@ Describe "Invoke-DbaAdvancedRestore" { $CommandUnderTest = Get-Command Invoke-DbaAdvancedRestore } It "Should have BackupHistory parameter" { - $CommandUnderTest | Should -HaveParameter BackupHistory -Type Object[] + $CommandUnderTest | Should -HaveParameter BackupHistory -Type System.Object[] } 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 OutputScriptOnly parameter" { - $CommandUnderTest | Should -HaveParameter OutputScriptOnly -Type Switch + $CommandUnderTest | Should -HaveParameter OutputScriptOnly -Type System.Management.Automation.SwitchParameter } It "Should have VerifyOnly parameter" { - $CommandUnderTest | Should -HaveParameter VerifyOnly -Type Switch + $CommandUnderTest | Should -HaveParameter VerifyOnly -Type System.Management.Automation.SwitchParameter } It "Should have RestoreTime parameter" { - $CommandUnderTest | Should -HaveParameter RestoreTime -Type DateTime + $CommandUnderTest | Should -HaveParameter RestoreTime -Type System.DateTime } It "Should have StandbyDirectory parameter" { - $CommandUnderTest | Should -HaveParameter StandbyDirectory -Type String + $CommandUnderTest | Should -HaveParameter StandbyDirectory -Type System.String } It "Should have NoRecovery parameter" { - $CommandUnderTest | Should -HaveParameter NoRecovery -Type Switch + $CommandUnderTest | Should -HaveParameter NoRecovery -Type System.Management.Automation.SwitchParameter } It "Should have MaxTransferSize parameter" { - $CommandUnderTest | Should -HaveParameter MaxTransferSize -Type Int32 + $CommandUnderTest | Should -HaveParameter MaxTransferSize -Type System.Int32 } It "Should have BlockSize parameter" { - $CommandUnderTest | Should -HaveParameter BlockSize -Type Int32 + $CommandUnderTest | Should -HaveParameter BlockSize -Type System.Int32 } It "Should have BufferCount parameter" { - $CommandUnderTest | Should -HaveParameter BufferCount -Type Int32 + $CommandUnderTest | Should -HaveParameter BufferCount -Type System.Int32 } It "Should have Continue parameter" { - $CommandUnderTest | Should -HaveParameter Continue -Type Switch + $CommandUnderTest | Should -HaveParameter Continue -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 WithReplace parameter" { - $CommandUnderTest | Should -HaveParameter WithReplace -Type Switch + $CommandUnderTest | Should -HaveParameter WithReplace -Type System.Management.Automation.SwitchParameter } It "Should have KeepReplication parameter" { - $CommandUnderTest | Should -HaveParameter KeepReplication -Type Switch + $CommandUnderTest | Should -HaveParameter KeepReplication -Type System.Management.Automation.SwitchParameter } It "Should have KeepCDC parameter" { - $CommandUnderTest | Should -HaveParameter KeepCDC -Type Switch + $CommandUnderTest | Should -HaveParameter KeepCDC -Type System.Management.Automation.SwitchParameter } It "Should have PageRestore parameter" { - $CommandUnderTest | Should -HaveParameter PageRestore -Type Object[] + $CommandUnderTest | Should -HaveParameter PageRestore -Type System.Object[] } It "Should have ExecuteAs parameter" { - $CommandUnderTest | Should -HaveParameter ExecuteAs -Type String + $CommandUnderTest | Should -HaveParameter ExecuteAs -Type System.String } It "Should have StopBefore parameter" { - $CommandUnderTest | Should -HaveParameter StopBefore -Type Switch + $CommandUnderTest | Should -HaveParameter StopBefore -Type System.Management.Automation.SwitchParameter } It "Should have StopMark parameter" { - $CommandUnderTest | Should -HaveParameter StopMark -Type String + $CommandUnderTest | Should -HaveParameter StopMark -Type System.String } It "Should have StopAfterDate parameter" { - $CommandUnderTest | Should -HaveParameter StopAfterDate -Type DateTime + $CommandUnderTest | Should -HaveParameter StopAfterDate -Type System.DateTime } It "Should have EnableException parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.SwitchParameter } } } diff --git a/tests/Invoke-DbaAdvancedUpdate.Tests.ps1 b/tests/Invoke-DbaAdvancedUpdate.Tests.ps1 index a463d0c656..33e1457ffd 100644 --- a/tests/Invoke-DbaAdvancedUpdate.Tests.ps1 +++ b/tests/Invoke-DbaAdvancedUpdate.Tests.ps1 @@ -27,31 +27,31 @@ Describe "Invoke-DbaAdvancedUpdate" { $CommandUnderTest = Get-Command Invoke-DbaAdvancedUpdate } It "Should have ComputerName as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ComputerName -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ComputerName -Type System.String -Mandatory:$false } It "Should have Action as a non-mandatory Object[] parameter" { - $CommandUnderTest | Should -HaveParameter Action -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Action -Type System.Object[] -Mandatory:$false } It "Should have Restart as a non-mandatory Boolean parameter" { - $CommandUnderTest | Should -HaveParameter Restart -Type Boolean -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Restart -Type System.Boolean -Mandatory:$false } It "Should have Authentication as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Authentication -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Authentication -Type System.String -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 ExtractPath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ExtractPath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExtractPath -Type System.String -Mandatory:$false } It "Should have ArgumentList as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter ArgumentList -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ArgumentList -Type System.String[] -Mandatory:$false } It "Should have NoPendingRenameCheck as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter NoPendingRenameCheck -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoPendingRenameCheck -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/Invoke-DbaAgFailover.Tests.ps1 b/tests/Invoke-DbaAgFailover.Tests.ps1 index 39538a2569..6e7b8c97e8 100644 --- a/tests/Invoke-DbaAgFailover.Tests.ps1 +++ b/tests/Invoke-DbaAgFailover.Tests.ps1 @@ -10,22 +10,22 @@ Describe "Invoke-DbaAgFailover" { $CommandUnderTest = Get-Command Invoke-DbaAgFailover } 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 AvailabilityGroup parameter" { - $CommandUnderTest | Should -HaveParameter AvailabilityGroup -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AvailabilityGroup -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 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/Invoke-DbaAzSqlDbTip.Tests.ps1 b/tests/Invoke-DbaAzSqlDbTip.Tests.ps1 index ff6885744d..d6b34ff5b6 100644 --- a/tests/Invoke-DbaAzSqlDbTip.Tests.ps1 +++ b/tests/Invoke-DbaAzSqlDbTip.Tests.ps1 @@ -18,37 +18,37 @@ Describe "Invoke-DbaAzSqlDbTip" { $CommandUnderTest | Should -HaveParameter SqlCredential -Type PSCredential } It "Should have AzureDomain as a parameter" { - $CommandUnderTest | Should -HaveParameter AzureDomain -Type String + $CommandUnderTest | Should -HaveParameter AzureDomain -Type System.String } It "Should have Tenant as a parameter" { - $CommandUnderTest | Should -HaveParameter Tenant -Type String + $CommandUnderTest | Should -HaveParameter Tenant -Type System.String } It "Should have LocalFile as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalFile -Type String + $CommandUnderTest | Should -HaveParameter LocalFile -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 ExcludeDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.String[] } It "Should have AllUserDatabases as a switch parameter" { - $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type Switch + $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type System.Management.Automation.SwitchParameter } It "Should have ReturnAllTips as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ReturnAllTips -Type Switch + $CommandUnderTest | Should -HaveParameter ReturnAllTips -Type System.Management.Automation.SwitchParameter } It "Should have Compat100 as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Compat100 -Type Switch + $CommandUnderTest | Should -HaveParameter Compat100 -Type System.Management.Automation.SwitchParameter } It "Should have StatementTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter StatementTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter StatementTimeout -Type System.Int32 } It "Should have EnableException as a switch parameter" { - $CommandUnderTest | Should -HaveParameter EnableException -Type Switch + $CommandUnderTest | Should -HaveParameter EnableException -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 } } diff --git a/tests/Invoke-DbaBalanceDataFiles.Tests.ps1 b/tests/Invoke-DbaBalanceDataFiles.Tests.ps1 index 458fa4b122..c17ff7cc36 100644 --- a/tests/Invoke-DbaBalanceDataFiles.Tests.ps1 +++ b/tests/Invoke-DbaBalanceDataFiles.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Invoke-DbaBalanceDataFiles" { $CommandUnderTest = Get-Command Invoke-DbaBalanceDataFiles } 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 Table parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -Type System.Object[] -Mandatory:$false } It "Should have RebuildOffline parameter" { - $CommandUnderTest | Should -HaveParameter RebuildOffline -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter RebuildOffline -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 Force parameter" { - $CommandUnderTest | Should -HaveParameter Force -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Force -Type System.Management.Automation.SwitchParameter -Mandatory:$false } } } diff --git a/tests/Invoke-DbaCycleErrorLog.Tests.ps1 b/tests/Invoke-DbaCycleErrorLog.Tests.ps1 index 4096fdbecf..9dfb22b93f 100644 --- a/tests/Invoke-DbaCycleErrorLog.Tests.ps1 +++ b/tests/Invoke-DbaCycleErrorLog.Tests.ps1 @@ -13,19 +13,19 @@ Describe "Invoke-DbaCycleErrorLog 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 Type parameter" { - $command | Should -HaveParameter Type -Type String -Mandatory:$false + $command | Should -HaveParameter Type -Type System.String -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/Invoke-DbaDbClone.Tests.ps1 b/tests/Invoke-DbaDbClone.Tests.ps1 index 26a903687a..797b9b554a 100644 --- a/tests/Invoke-DbaDbClone.Tests.ps1 +++ b/tests/Invoke-DbaDbClone.Tests.ps1 @@ -12,31 +12,31 @@ Describe "Invoke-DbaDbClone" { $CommandUnderTest = Get-Command Invoke-DbaDbClone } 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 InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have CloneDatabase parameter" { - $CommandUnderTest | Should -HaveParameter CloneDatabase -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CloneDatabase -Type System.String[] -Mandatory:$false } It "Should have ExcludeStatistics parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeStatistics -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeStatistics -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExcludeQueryStore parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeQueryStore -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeQueryStore -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have UpdateStatistics parameter" { - $CommandUnderTest | Should -HaveParameter UpdateStatistics -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter UpdateStatistics -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/Invoke-DbaDbCorruption.Tests.ps1 b/tests/Invoke-DbaDbCorruption.Tests.ps1 index 5b74c0a86b..770bb0bd2b 100644 --- a/tests/Invoke-DbaDbCorruption.Tests.ps1 +++ b/tests/Invoke-DbaDbCorruption.Tests.ps1 @@ -18,13 +18,13 @@ Describe "Invoke-DbaDbCorruption" { $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 Table parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String + $CommandUnderTest | Should -HaveParameter Table -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/Invoke-DbaDbDataGenerator.Tests.ps1 b/tests/Invoke-DbaDbDataGenerator.Tests.ps1 index 3fcff4461e..295f320daf 100644 --- a/tests/Invoke-DbaDbDataGenerator.Tests.ps1 +++ b/tests/Invoke-DbaDbDataGenerator.Tests.ps1 @@ -18,40 +18,40 @@ Describe "Invoke-DbaDbDataGenerator" { $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 FilePath parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type Object -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FilePath -Type System.Object -Mandatory:$false } It "Should have Locale parameter" { - $CommandUnderTest | Should -HaveParameter Locale -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Locale -Type System.String -Mandatory:$false } It "Should have CharacterString parameter" { - $CommandUnderTest | Should -HaveParameter CharacterString -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CharacterString -Type System.String -Mandatory:$false } It "Should have Table parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] -Mandatory:$false } It "Should have Column parameter" { - $CommandUnderTest | Should -HaveParameter Column -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Column -Type System.String[] -Mandatory:$false } It "Should have ExcludeTable parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeTable -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeTable -Type System.String[] -Mandatory:$false } It "Should have ExcludeColumn parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeColumn -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeColumn -Type System.String[] -Mandatory:$false } It "Should have MaxValue parameter" { - $CommandUnderTest | Should -HaveParameter MaxValue -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MaxValue -Type System.Int32 -Mandatory:$false } It "Should have ExactLength parameter" { - $CommandUnderTest | Should -HaveParameter ExactLength -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExactLength -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ModulusFactor parameter" { - $CommandUnderTest | Should -HaveParameter ModulusFactor -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ModulusFactor -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/Invoke-DbaDbDataMasking.Tests.ps1 b/tests/Invoke-DbaDbDataMasking.Tests.ps1 index a02d30910f..69e9af86bb 100644 --- a/tests/Invoke-DbaDbDataMasking.Tests.ps1 +++ b/tests/Invoke-DbaDbDataMasking.Tests.ps1 @@ -38,61 +38,61 @@ Describe "Invoke-DbaDbDataMasking" { $CommandUnderTest = Get-Command Invoke-DbaDbDataMasking } 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 FilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter FilePath -Type Object + $CommandUnderTest | Should -HaveParameter FilePath -Type System.Object } It "Should have Locale as a parameter" { - $CommandUnderTest | Should -HaveParameter Locale -Type String + $CommandUnderTest | Should -HaveParameter Locale -Type System.String } It "Should have CharacterString as a parameter" { - $CommandUnderTest | Should -HaveParameter CharacterString -Type String + $CommandUnderTest | Should -HaveParameter CharacterString -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 Column as a parameter" { - $CommandUnderTest | Should -HaveParameter Column -Type String[] + $CommandUnderTest | Should -HaveParameter Column -Type System.String[] } It "Should have ExcludeTable as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeTable -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeTable -Type System.String[] } It "Should have ExcludeColumn as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeColumn -Type String[] + $CommandUnderTest | Should -HaveParameter ExcludeColumn -Type System.String[] } It "Should have MaxValue as a parameter" { - $CommandUnderTest | Should -HaveParameter MaxValue -Type Int32 + $CommandUnderTest | Should -HaveParameter MaxValue -Type System.Int32 } It "Should have ModulusFactor as a parameter" { - $CommandUnderTest | Should -HaveParameter ModulusFactor -Type Int32 + $CommandUnderTest | Should -HaveParameter ModulusFactor -Type System.Int32 } It "Should have ExactLength as a parameter" { - $CommandUnderTest | Should -HaveParameter ExactLength -Type Switch + $CommandUnderTest | Should -HaveParameter ExactLength -Type System.Management.Automation.Switch } It "Should have CommandTimeout as a parameter" { - $CommandUnderTest | Should -HaveParameter CommandTimeout -Type Int32 + $CommandUnderTest | Should -HaveParameter CommandTimeout -Type System.Int32 } It "Should have BatchSize as a parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 } It "Should have Retry as a parameter" { - $CommandUnderTest | Should -HaveParameter Retry -Type Int32 + $CommandUnderTest | Should -HaveParameter Retry -Type System.Int32 } It "Should have DictionaryFilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter DictionaryFilePath -Type String[] + $CommandUnderTest | Should -HaveParameter DictionaryFilePath -Type System.String[] } It "Should have DictionaryExportPath as a parameter" { - $CommandUnderTest | Should -HaveParameter DictionaryExportPath -Type String + $CommandUnderTest | Should -HaveParameter DictionaryExportPath -Type System.String } 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/Invoke-DbaDbDbccCheckConstraint.Tests.ps1 b/tests/Invoke-DbaDbDbccCheckConstraint.Tests.ps1 index bb2385d8ae..93a49d7408 100644 --- a/tests/Invoke-DbaDbDbccCheckConstraint.Tests.ps1 +++ b/tests/Invoke-DbaDbDbccCheckConstraint.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Invoke-DbaDbDbccCheckConstraint Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Invoke-DbaDbDbccCheckConstraint } It "Should have SqlInstance 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 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 Object parameter" { - $CommandUnderTest | Should -HaveParameter Object -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Object -Type System.String -Mandatory:$false } It "Should have AllConstraints parameter" { - $CommandUnderTest | Should -HaveParameter AllConstraints -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllConstraints -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have AllErrorMessages parameter" { - $CommandUnderTest | Should -HaveParameter AllErrorMessages -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllErrorMessages -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have NoInformationalMessages parameter" { - $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoInformationalMessages -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/Invoke-DbaDbDbccCleanTable.Tests.ps1 b/tests/Invoke-DbaDbDbccCleanTable.Tests.ps1 index e2f80fa532..e010ed4149 100644 --- a/tests/Invoke-DbaDbDbccCleanTable.Tests.ps1 +++ b/tests/Invoke-DbaDbDbccCleanTable.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Invoke-DbaDbDbccCleanTable" { $CommandUnderTest = Get-Command Invoke-DbaDbDbccCleanTable } It "Should have SqlInstance 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 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 Object parameter" { - $CommandUnderTest | Should -HaveParameter Object -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Object -Type System.String[] -Mandatory:$false } It "Should have BatchSize parameter" { - $CommandUnderTest | Should -HaveParameter BatchSize -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter BatchSize -Type System.Int32 -Mandatory:$false } It "Should have NoInformationalMessages parameter" { - $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoInformationalMessages -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/Invoke-DbaDbDbccUpdateUsage.Tests.ps1 b/tests/Invoke-DbaDbDbccUpdateUsage.Tests.ps1 index de7c3ca354..171e3e1ccc 100644 --- a/tests/Invoke-DbaDbDbccUpdateUsage.Tests.ps1 +++ b/tests/Invoke-DbaDbDbccUpdateUsage.Tests.ps1 @@ -26,28 +26,28 @@ Describe "Invoke-DbaDbDbccUpdateUsage" { $CommandUnderTest = Get-Command Invoke-DbaDbDbccUpdateUsage } 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 Table parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String + $CommandUnderTest | Should -HaveParameter Table -Type System.String } It "Should have Index parameter" { - $CommandUnderTest | Should -HaveParameter Index -Type String + $CommandUnderTest | Should -HaveParameter Index -Type System.String } It "Should have NoInformationalMessages parameter" { - $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type Switch + $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type System.Management.Automation.SwitchParameter } It "Should have CountRows parameter" { - $CommandUnderTest | Should -HaveParameter CountRows -Type Switch + $CommandUnderTest | Should -HaveParameter CountRows -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/Invoke-DbaDbDecryptObject.Tests.ps1 b/tests/Invoke-DbaDbDecryptObject.Tests.ps1 index 24a53bdf3e..1c215e336e 100644 --- a/tests/Invoke-DbaDbDecryptObject.Tests.ps1 +++ b/tests/Invoke-DbaDbDecryptObject.Tests.ps1 @@ -12,25 +12,25 @@ Describe "Invoke-DbaDbDecryptObject 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.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 Object[] -Mandatory:$false + $command | Should -HaveParameter Database -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have ObjectName parameter" { - $command | Should -HaveParameter ObjectName -Type String[] -Mandatory:$false + $command | Should -HaveParameter ObjectName -Type System.String[] -Mandatory:$false } It "Should have EncodingType parameter" { - $command | Should -HaveParameter EncodingType -Type String -Mandatory:$false + $command | Should -HaveParameter EncodingType -Type System.String -Mandatory:$false } It "Should have ExportDestination parameter" { - $command | Should -HaveParameter ExportDestination -Type String -Mandatory:$false + $command | Should -HaveParameter ExportDestination -Type System.String -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/Invoke-DbaDbLogShipRecovery.Tests.ps1 b/tests/Invoke-DbaDbLogShipRecovery.Tests.ps1 index 5b2ba7b4d4..3326dd6ed8 100644 --- a/tests/Invoke-DbaDbLogShipRecovery.Tests.ps1 +++ b/tests/Invoke-DbaDbLogShipRecovery.Tests.ps1 @@ -12,28 +12,28 @@ Describe "Invoke-DbaDbLogShipRecovery" { $CommandUnderTest = Get-Command Invoke-DbaDbLogShipRecovery } 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 String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } 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 NoRecovery as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoRecovery -Type Switch + $CommandUnderTest | Should -HaveParameter NoRecovery -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 } 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 Delay as a parameter" { - $CommandUnderTest | Should -HaveParameter Delay -Type Int32 + $CommandUnderTest | Should -HaveParameter Delay -Type System.Int32 } } } diff --git a/tests/Invoke-DbaDbLogShipping.Tests.ps1 b/tests/Invoke-DbaDbLogShipping.Tests.ps1 index 009a4f2e45..d391bbad05 100644 --- a/tests/Invoke-DbaDbLogShipping.Tests.ps1 +++ b/tests/Invoke-DbaDbLogShipping.Tests.ps1 @@ -13,247 +13,247 @@ Describe "Invoke-DbaDbLogShipping" { $CommandUnderTest = Get-Command Invoke-DbaDbLogShipping } It "Should have SourceSqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter SourceSqlInstance -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter SourceSqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have DestinationSqlInstance as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationSqlInstance -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter DestinationSqlInstance -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 SourceCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SourceCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SourceCredential -Type System.Management.Automation.PSCredential } 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 DestinationCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter DestinationCredential -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 SharedPath as a parameter" { - $CommandUnderTest | Should -HaveParameter SharedPath -Type String + $CommandUnderTest | Should -HaveParameter SharedPath -Type System.String } It "Should have LocalPath as a parameter" { - $CommandUnderTest | Should -HaveParameter LocalPath -Type String + $CommandUnderTest | Should -HaveParameter LocalPath -Type System.String } It "Should have BackupJob as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupJob -Type String + $CommandUnderTest | Should -HaveParameter BackupJob -Type System.String } It "Should have BackupRetention as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupRetention -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupRetention -Type System.Int32 } It "Should have BackupSchedule as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupSchedule -Type String + $CommandUnderTest | Should -HaveParameter BackupSchedule -Type System.String } It "Should have BackupScheduleDisabled as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleDisabled -Type Switch + $CommandUnderTest | Should -HaveParameter BackupScheduleDisabled -Type System.Management.Automation.SwitchParameter } It "Should have BackupScheduleFrequencyType as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyType -Type Object + $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyType -Type System.Object } It "Should have BackupScheduleFrequencyInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyInterval -Type Object[] + $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyInterval -Type System.Object[] } It "Should have BackupScheduleFrequencySubdayType as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencySubdayType -Type Object + $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencySubdayType -Type System.Object } It "Should have BackupScheduleFrequencySubdayInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencySubdayInterval -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencySubdayInterval -Type System.Int32 } It "Should have BackupScheduleFrequencyRelativeInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyRelativeInterval -Type Object + $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyRelativeInterval -Type System.Object } It "Should have BackupScheduleFrequencyRecurrenceFactor as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyRecurrenceFactor -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupScheduleFrequencyRecurrenceFactor -Type System.Int32 } It "Should have BackupScheduleStartDate as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleStartDate -Type String + $CommandUnderTest | Should -HaveParameter BackupScheduleStartDate -Type System.String } It "Should have BackupScheduleEndDate as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleEndDate -Type String + $CommandUnderTest | Should -HaveParameter BackupScheduleEndDate -Type System.String } It "Should have BackupScheduleStartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleStartTime -Type String + $CommandUnderTest | Should -HaveParameter BackupScheduleStartTime -Type System.String } It "Should have BackupScheduleEndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupScheduleEndTime -Type String + $CommandUnderTest | Should -HaveParameter BackupScheduleEndTime -Type System.String } It "Should have BackupThreshold as a parameter" { - $CommandUnderTest | Should -HaveParameter BackupThreshold -Type Int32 + $CommandUnderTest | Should -HaveParameter BackupThreshold -Type System.Int32 } It "Should have CompressBackup as a parameter" { - $CommandUnderTest | Should -HaveParameter CompressBackup -Type Switch + $CommandUnderTest | Should -HaveParameter CompressBackup -Type System.Management.Automation.SwitchParameter } It "Should have CopyDestinationFolder as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyDestinationFolder -Type String + $CommandUnderTest | Should -HaveParameter CopyDestinationFolder -Type System.String } It "Should have CopyJob as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyJob -Type String + $CommandUnderTest | Should -HaveParameter CopyJob -Type System.String } It "Should have CopyRetention as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyRetention -Type Int32 + $CommandUnderTest | Should -HaveParameter CopyRetention -Type System.Int32 } It "Should have CopySchedule as a parameter" { - $CommandUnderTest | Should -HaveParameter CopySchedule -Type String + $CommandUnderTest | Should -HaveParameter CopySchedule -Type System.String } It "Should have CopyScheduleDisabled as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleDisabled -Type Switch + $CommandUnderTest | Should -HaveParameter CopyScheduleDisabled -Type System.Management.Automation.SwitchParameter } It "Should have CopyScheduleFrequencyType as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyType -Type Object + $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyType -Type System.Object } It "Should have CopyScheduleFrequencyInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyInterval -Type Object[] + $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyInterval -Type System.Object[] } It "Should have CopyScheduleFrequencySubdayType as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencySubdayType -Type Object + $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencySubdayType -Type System.Object } It "Should have CopyScheduleFrequencySubdayInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencySubdayInterval -Type Int32 + $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencySubdayInterval -Type System.Int32 } It "Should have CopyScheduleFrequencyRelativeInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyRelativeInterval -Type Object + $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyRelativeInterval -Type System.Object } It "Should have CopyScheduleFrequencyRecurrenceFactor as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyRecurrenceFactor -Type Int32 + $CommandUnderTest | Should -HaveParameter CopyScheduleFrequencyRecurrenceFactor -Type System.Int32 } It "Should have CopyScheduleStartDate as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleStartDate -Type String + $CommandUnderTest | Should -HaveParameter CopyScheduleStartDate -Type System.String } It "Should have CopyScheduleEndDate as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleEndDate -Type String + $CommandUnderTest | Should -HaveParameter CopyScheduleEndDate -Type System.String } It "Should have CopyScheduleStartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleStartTime -Type String + $CommandUnderTest | Should -HaveParameter CopyScheduleStartTime -Type System.String } It "Should have CopyScheduleEndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter CopyScheduleEndTime -Type String + $CommandUnderTest | Should -HaveParameter CopyScheduleEndTime -Type System.String } It "Should have DisconnectUsers as a parameter" { - $CommandUnderTest | Should -HaveParameter DisconnectUsers -Type Switch + $CommandUnderTest | Should -HaveParameter DisconnectUsers -Type System.Management.Automation.SwitchParameter } It "Should have FullBackupPath as a parameter" { - $CommandUnderTest | Should -HaveParameter FullBackupPath -Type String + $CommandUnderTest | Should -HaveParameter FullBackupPath -Type System.String } It "Should have GenerateFullBackup as a parameter" { - $CommandUnderTest | Should -HaveParameter GenerateFullBackup -Type Switch + $CommandUnderTest | Should -HaveParameter GenerateFullBackup -Type System.Management.Automation.SwitchParameter } It "Should have HistoryRetention as a parameter" { - $CommandUnderTest | Should -HaveParameter HistoryRetention -Type Int32 + $CommandUnderTest | Should -HaveParameter HistoryRetention -Type System.Int32 } It "Should have NoRecovery as a parameter" { - $CommandUnderTest | Should -HaveParameter NoRecovery -Type Switch + $CommandUnderTest | Should -HaveParameter NoRecovery -Type System.Management.Automation.SwitchParameter } It "Should have NoInitialization as a parameter" { - $CommandUnderTest | Should -HaveParameter NoInitialization -Type Switch + $CommandUnderTest | Should -HaveParameter NoInitialization -Type System.Management.Automation.SwitchParameter } It "Should have PrimaryMonitorServer as a parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryMonitorServer -Type String + $CommandUnderTest | Should -HaveParameter PrimaryMonitorServer -Type System.String } It "Should have PrimaryMonitorCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryMonitorCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter PrimaryMonitorCredential -Type System.Management.Automation.PSCredential } It "Should have PrimaryMonitorServerSecurityMode as a parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryMonitorServerSecurityMode -Type Object + $CommandUnderTest | Should -HaveParameter PrimaryMonitorServerSecurityMode -Type System.Object } It "Should have PrimaryThresholdAlertEnabled as a parameter" { - $CommandUnderTest | Should -HaveParameter PrimaryThresholdAlertEnabled -Type Switch + $CommandUnderTest | Should -HaveParameter PrimaryThresholdAlertEnabled -Type System.Management.Automation.SwitchParameter } It "Should have RestoreDataFolder as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreDataFolder -Type String + $CommandUnderTest | Should -HaveParameter RestoreDataFolder -Type System.String } It "Should have RestoreLogFolder as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreLogFolder -Type String + $CommandUnderTest | Should -HaveParameter RestoreLogFolder -Type System.String } It "Should have RestoreDelay as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreDelay -Type Int32 + $CommandUnderTest | Should -HaveParameter RestoreDelay -Type System.Int32 } It "Should have RestoreAlertThreshold as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreAlertThreshold -Type Int32 + $CommandUnderTest | Should -HaveParameter RestoreAlertThreshold -Type System.Int32 } It "Should have RestoreJob as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreJob -Type String + $CommandUnderTest | Should -HaveParameter RestoreJob -Type System.String } It "Should have RestoreRetention as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreRetention -Type Int32 + $CommandUnderTest | Should -HaveParameter RestoreRetention -Type System.Int32 } It "Should have RestoreSchedule as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreSchedule -Type String + $CommandUnderTest | Should -HaveParameter RestoreSchedule -Type System.String } It "Should have RestoreScheduleDisabled as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleDisabled -Type Switch + $CommandUnderTest | Should -HaveParameter RestoreScheduleDisabled -Type System.Management.Automation.SwitchParameter } It "Should have RestoreScheduleFrequencyType as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyType -Type Object + $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyType -Type System.Object } It "Should have RestoreScheduleFrequencyInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyInterval -Type Object[] + $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyInterval -Type System.Object[] } It "Should have RestoreScheduleFrequencySubdayType as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencySubdayType -Type Object + $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencySubdayType -Type System.Object } It "Should have RestoreScheduleFrequencySubdayInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencySubdayInterval -Type Int32 + $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencySubdayInterval -Type System.Int32 } It "Should have RestoreScheduleFrequencyRelativeInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyRelativeInterval -Type Object + $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyRelativeInterval -Type System.Object } It "Should have RestoreScheduleFrequencyRecurrenceFactor as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyRecurrenceFactor -Type Int32 + $CommandUnderTest | Should -HaveParameter RestoreScheduleFrequencyRecurrenceFactor -Type System.Int32 } It "Should have RestoreScheduleStartDate as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleStartDate -Type String + $CommandUnderTest | Should -HaveParameter RestoreScheduleStartDate -Type System.String } It "Should have RestoreScheduleEndDate as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleEndDate -Type String + $CommandUnderTest | Should -HaveParameter RestoreScheduleEndDate -Type System.String } It "Should have RestoreScheduleStartTime as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleStartTime -Type String + $CommandUnderTest | Should -HaveParameter RestoreScheduleStartTime -Type System.String } It "Should have RestoreScheduleEndTime as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreScheduleEndTime -Type String + $CommandUnderTest | Should -HaveParameter RestoreScheduleEndTime -Type System.String } It "Should have RestoreThreshold as a parameter" { - $CommandUnderTest | Should -HaveParameter RestoreThreshold -Type Int32 + $CommandUnderTest | Should -HaveParameter RestoreThreshold -Type System.Int32 } It "Should have SecondaryDatabasePrefix as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryDatabasePrefix -Type String + $CommandUnderTest | Should -HaveParameter SecondaryDatabasePrefix -Type System.String } It "Should have SecondaryDatabaseSuffix as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryDatabaseSuffix -Type String + $CommandUnderTest | Should -HaveParameter SecondaryDatabaseSuffix -Type System.String } It "Should have SecondaryMonitorServer as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryMonitorServer -Type String + $CommandUnderTest | Should -HaveParameter SecondaryMonitorServer -Type System.String } It "Should have SecondaryMonitorCredential as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryMonitorCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter SecondaryMonitorCredential -Type System.Management.Automation.PSCredential } It "Should have SecondaryMonitorServerSecurityMode as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryMonitorServerSecurityMode -Type Object + $CommandUnderTest | Should -HaveParameter SecondaryMonitorServerSecurityMode -Type System.Object } It "Should have SecondaryThresholdAlertEnabled as a parameter" { - $CommandUnderTest | Should -HaveParameter SecondaryThresholdAlertEnabled -Type Switch + $CommandUnderTest | Should -HaveParameter SecondaryThresholdAlertEnabled -Type System.Management.Automation.SwitchParameter } It "Should have Standby as a parameter" { - $CommandUnderTest | Should -HaveParameter Standby -Type Switch + $CommandUnderTest | Should -HaveParameter Standby -Type System.Management.Automation.SwitchParameter } It "Should have StandbyDirectory as a parameter" { - $CommandUnderTest | Should -HaveParameter StandbyDirectory -Type String + $CommandUnderTest | Should -HaveParameter StandbyDirectory -Type System.String } It "Should have UseExistingFullBackup as a parameter" { - $CommandUnderTest | Should -HaveParameter UseExistingFullBackup -Type Switch + $CommandUnderTest | Should -HaveParameter UseExistingFullBackup -Type System.Management.Automation.SwitchParameter } It "Should have UseBackupFolder as a parameter" { - $CommandUnderTest | Should -HaveParameter UseBackupFolder -Type String + $CommandUnderTest | Should -HaveParameter UseBackupFolder -Type System.String } 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/Invoke-DbaDbMirrorFailover.Tests.ps1 b/tests/Invoke-DbaDbMirrorFailover.Tests.ps1 index 03d8f082dd..e0bae5472f 100644 --- a/tests/Invoke-DbaDbMirrorFailover.Tests.ps1 +++ b/tests/Invoke-DbaDbMirrorFailover.Tests.ps1 @@ -10,22 +10,22 @@ Describe "Invoke-DbaDbMirrorFailover" { $CommandUnderTest = Get-Command Invoke-DbaDbMirrorFailover } It "Should have SqlInstance as a non-mandatory parameter of type DbaInstanceParameter" { - $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 non-mandatory parameter of type PSCredential" { - $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 non-mandatory parameter of type String[]" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] -Mandatory:$false + $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 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/Invoke-DbaDbMirroring.Tests.ps1 b/tests/Invoke-DbaDbMirroring.Tests.ps1 index 0041653e4e..43d7723989 100644 --- a/tests/Invoke-DbaDbMirroring.Tests.ps1 +++ b/tests/Invoke-DbaDbMirroring.Tests.ps1 @@ -12,46 +12,46 @@ Describe "Invoke-DbaDbMirroring" { $CommandUnderTest = Get-Command Invoke-DbaDbMirroring } 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 Microsoft.SqlServer.Management.Smo.PSCredential } It "Should have Mirror parameter" { - $CommandUnderTest | Should -HaveParameter Mirror -Type DbaInstanceParameter[] + $CommandUnderTest | Should -HaveParameter Mirror -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] } It "Should have MirrorSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter MirrorSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter MirrorSqlCredential -Type Microsoft.SqlServer.Management.Smo.PSCredential } It "Should have Witness parameter" { - $CommandUnderTest | Should -HaveParameter Witness -Type DbaInstanceParameter + $CommandUnderTest | Should -HaveParameter Witness -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter } It "Should have WitnessSqlCredential parameter" { - $CommandUnderTest | Should -HaveParameter WitnessSqlCredential -Type PSCredential + $CommandUnderTest | Should -HaveParameter WitnessSqlCredential -Type Microsoft.SqlServer.Management.Smo.PSCredential } It "Should have Database parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String[] + $CommandUnderTest | Should -HaveParameter Database -Type System.String[] } It "Should have EndpointEncryption parameter" { - $CommandUnderTest | Should -HaveParameter EndpointEncryption -Type String + $CommandUnderTest | Should -HaveParameter EndpointEncryption -Type System.String } It "Should have EncryptionAlgorithm parameter" { - $CommandUnderTest | Should -HaveParameter EncryptionAlgorithm -Type String + $CommandUnderTest | Should -HaveParameter EncryptionAlgorithm -Type System.String } It "Should have SharedPath parameter" { - $CommandUnderTest | Should -HaveParameter SharedPath -Type String + $CommandUnderTest | Should -HaveParameter SharedPath -Type System.String } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] } It "Should have UseLastBackup parameter" { - $CommandUnderTest | Should -HaveParameter UseLastBackup -Type Switch + $CommandUnderTest | Should -HaveParameter UseLastBackup -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/Invoke-DbaDbPiiScan.Tests.ps1 b/tests/Invoke-DbaDbPiiScan.Tests.ps1 index 586349bd74..5967d528bc 100644 --- a/tests/Invoke-DbaDbPiiScan.Tests.ps1 +++ b/tests/Invoke-DbaDbPiiScan.Tests.ps1 @@ -12,49 +12,49 @@ Describe "Invoke-DbaDbPiiScan Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Invoke-DbaDbPiiScan } 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 Table as a parameter" { - $CommandUnderTest | Should -HaveParameter Table -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Table -Type System.String[] -Mandatory:$false } It "Should have Column as a parameter" { - $CommandUnderTest | Should -HaveParameter Column -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Column -Type System.String[] -Mandatory:$false } It "Should have Country as a parameter" { - $CommandUnderTest | Should -HaveParameter Country -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Country -Type System.String[] -Mandatory:$false } It "Should have CountryCode as a parameter" { - $CommandUnderTest | Should -HaveParameter CountryCode -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CountryCode -Type System.String[] -Mandatory:$false } It "Should have ExcludeTable as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeTable -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeTable -Type System.String[] -Mandatory:$false } It "Should have ExcludeColumn as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeColumn -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeColumn -Type System.String[] -Mandatory:$false } It "Should have SampleCount as a parameter" { - $CommandUnderTest | Should -HaveParameter SampleCount -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SampleCount -Type System.Int32 -Mandatory:$false } It "Should have KnownNameFilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter KnownNameFilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter KnownNameFilePath -Type System.String -Mandatory:$false } It "Should have PatternFilePath as a parameter" { - $CommandUnderTest | Should -HaveParameter PatternFilePath -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PatternFilePath -Type System.String -Mandatory:$false } It "Should have ExcludeDefaultKnownName as a 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 parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeDefaultPattern -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeDefaultPattern -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/Invoke-DbaDbShrink.Tests.ps1 b/tests/Invoke-DbaDbShrink.Tests.ps1 index ff2fcd678a..e6e7a29dfe 100644 --- a/tests/Invoke-DbaDbShrink.Tests.ps1 +++ b/tests/Invoke-DbaDbShrink.Tests.ps1 @@ -12,43 +12,43 @@ Describe "Invoke-DbaDbShrink Unit Tests" -Tag 'UnitTests' { $CommandUnderTest = Get-Command Invoke-DbaDbShrink } 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 AllUserDatabases parameter" { - $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have PercentFreeSpace parameter" { - $CommandUnderTest | Should -HaveParameter PercentFreeSpace -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter PercentFreeSpace -Type System.Int32 -Mandatory:$false } It "Should have ShrinkMethod parameter" { - $CommandUnderTest | Should -HaveParameter ShrinkMethod -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ShrinkMethod -Type System.String -Mandatory:$false } It "Should have FileType parameter" { - $CommandUnderTest | Should -HaveParameter FileType -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter FileType -Type System.String -Mandatory:$false } It "Should have StepSize parameter" { - $CommandUnderTest | Should -HaveParameter StepSize -Type Int64 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StepSize -Type System.Int64 -Mandatory:$false } It "Should have StatementTimeout parameter" { - $CommandUnderTest | Should -HaveParameter StatementTimeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter StatementTimeout -Type System.Int32 -Mandatory:$false } It "Should have ExcludeIndexStats parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeIndexStats -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeIndexStats -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have ExcludeUpdateUsage parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeUpdateUsage -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ExcludeUpdateUsage -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/Invoke-DbaDbTransfer.Tests.ps1 b/tests/Invoke-DbaDbTransfer.Tests.ps1 index 4e65d1b133..51967c210b 100644 --- a/tests/Invoke-DbaDbTransfer.Tests.ps1 +++ b/tests/Invoke-DbaDbTransfer.Tests.ps1 @@ -55,22 +55,22 @@ Describe "Invoke-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 Transfer + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Transfer } It "Should have CopyAllObjects as a switch parameter" { $CommandUnderTest | Should -HaveParameter CopyAllObjects -Type Switch diff --git a/tests/Invoke-DbaDbUpgrade.Tests.ps1 b/tests/Invoke-DbaDbUpgrade.Tests.ps1 index 16f21173f7..84126268da 100644 --- a/tests/Invoke-DbaDbUpgrade.Tests.ps1 +++ b/tests/Invoke-DbaDbUpgrade.Tests.ps1 @@ -10,40 +10,40 @@ Describe "Invoke-DbaDbUpgrade" { $CommandUnderTest = Get-Command Invoke-DbaDbUpgrade } 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 NoCheckDb parameter" { - $CommandUnderTest | Should -HaveParameter NoCheckDb -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoCheckDb -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoUpdateUsage parameter" { - $CommandUnderTest | Should -HaveParameter NoUpdateUsage -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoUpdateUsage -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoUpdateStats parameter" { - $CommandUnderTest | Should -HaveParameter NoUpdateStats -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoUpdateStats -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have NoRefreshView parameter" { - $CommandUnderTest | Should -HaveParameter NoRefreshView -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoRefreshView -Type System.Management.Automation.SwitchParameter -Mandatory:$false } It "Should have AllUserDatabases parameter" { - $CommandUnderTest | Should -HaveParameter AllUserDatabases -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AllUserDatabases -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 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/Invoke-DbaDbccDropCleanBuffer.Tests.ps1 b/tests/Invoke-DbaDbccDropCleanBuffer.Tests.ps1 index 47ee6b385d..cb8cac0734 100644 --- a/tests/Invoke-DbaDbccDropCleanBuffer.Tests.ps1 +++ b/tests/Invoke-DbaDbccDropCleanBuffer.Tests.ps1 @@ -11,10 +11,10 @@ Describe "Invoke-DbaDbccDropCleanBuffer" { $CommandUnderTest = Get-Command Invoke-DbaDbccDropCleanBuffer } 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 NoInformationalMessages as a switch parameter" { $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type switch diff --git a/tests/Invoke-DbaDbccFreeCache.Tests.ps1 b/tests/Invoke-DbaDbccFreeCache.Tests.ps1 index 7ea7f114b5..d04bceabc4 100644 --- a/tests/Invoke-DbaDbccFreeCache.Tests.ps1 +++ b/tests/Invoke-DbaDbccFreeCache.Tests.ps1 @@ -11,25 +11,25 @@ Describe "Invoke-DbaDbccFreeCache" { $CommandUnderTest = Get-Command Invoke-DbaDbccFreeCache } 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 Operation as a parameter" { - $CommandUnderTest | Should -HaveParameter Operation -Type String + $CommandUnderTest | Should -HaveParameter Operation -Type System.String } It "Should have InputValue as a parameter" { - $CommandUnderTest | Should -HaveParameter InputValue -Type String + $CommandUnderTest | Should -HaveParameter InputValue -Type System.String } It "Should have NoInformationalMessages as a parameter" { - $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type Switch + $CommandUnderTest | Should -HaveParameter NoInformationalMessages -Type System.Management.Automation.SwitchParameter } It "Should have MarkInUseForRemoval as a parameter" { - $CommandUnderTest | Should -HaveParameter MarkInUseForRemoval -Type Switch + $CommandUnderTest | Should -HaveParameter MarkInUseForRemoval -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/Invoke-DbaDiagnosticQuery.Tests.ps1 b/tests/Invoke-DbaDiagnosticQuery.Tests.ps1 index 429912e268..c862485b3c 100644 --- a/tests/Invoke-DbaDiagnosticQuery.Tests.ps1 +++ b/tests/Invoke-DbaDiagnosticQuery.Tests.ps1 @@ -39,52 +39,52 @@ Describe "Invoke-DbaDiagnosticQuery" { $CommandUnderTest = Get-Command Invoke-DbaDiagnosticQuery } 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 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 ExcludeQuery as a parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeQuery -Type Object[] + $CommandUnderTest | Should -HaveParameter ExcludeQuery -Type Microsoft.SqlServer.Management.Smo.SqlSmoObject[] } 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 System.IO.FileInfo } It "Should have QueryName as a parameter" { - $CommandUnderTest | Should -HaveParameter QueryName -Type String[] + $CommandUnderTest | Should -HaveParameter QueryName -Type System.String[] } It "Should have UseSelectionHelper as a switch parameter" { - $CommandUnderTest | Should -HaveParameter UseSelectionHelper -Type Switch + $CommandUnderTest | Should -HaveParameter UseSelectionHelper -Type System.Management.Automation.SwitchParameter } It "Should have InstanceOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter InstanceOnly -Type Switch + $CommandUnderTest | Should -HaveParameter InstanceOnly -Type System.Management.Automation.SwitchParameter } It "Should have DatabaseSpecific as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseSpecific -Type Switch + $CommandUnderTest | Should -HaveParameter DatabaseSpecific -Type System.Management.Automation.SwitchParameter } It "Should have ExcludeQueryTextColumn as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludeQueryTextColumn -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludeQueryTextColumn -Type System.Management.Automation.SwitchParameter } It "Should have ExcludePlanColumn as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExcludePlanColumn -Type Switch + $CommandUnderTest | Should -HaveParameter ExcludePlanColumn -Type System.Management.Automation.SwitchParameter } It "Should have NoColumnParsing as a switch parameter" { - $CommandUnderTest | Should -HaveParameter NoColumnParsing -Type Switch + $CommandUnderTest | Should -HaveParameter NoColumnParsing -Type System.Management.Automation.SwitchParameter } It "Should have OutputPath as a parameter" { - $CommandUnderTest | Should -HaveParameter OutputPath -Type String + $CommandUnderTest | Should -HaveParameter OutputPath -Type System.String } It "Should have ExportQueries as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ExportQueries -Type Switch + $CommandUnderTest | Should -HaveParameter ExportQueries -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/Invoke-DbaPfRelog.Tests.ps1 b/tests/Invoke-DbaPfRelog.Tests.ps1 index af0d87a42d..41c77db2e6 100644 --- a/tests/Invoke-DbaPfRelog.Tests.ps1 +++ b/tests/Invoke-DbaPfRelog.Tests.ps1 @@ -11,56 +11,56 @@ Describe "Invoke-DbaPfRelog Unit Tests" -Tag 'UnitTests' { BeforeAll { $CommandUnderTest = Get-Command Invoke-DbaPfRelog } - 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 Destination as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter Destination -Type String -Mandatory:$false + It "Should have Destination as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter Destination -Type System.String -Mandatory:$false } - 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 Append as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Append -Type Switch -Mandatory:$false + It "Should have Append as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Append -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have AllowClobber as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter AllowClobber -Type Switch -Mandatory:$false + It "Should have AllowClobber as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter AllowClobber -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have PerformanceCounter as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter PerformanceCounter -Type String[] -Mandatory:$false + It "Should have PerformanceCounter as a non-mandatory System.String[] parameter" { + $CommandUnderTest | Should -HaveParameter PerformanceCounter -Type System.String[] -Mandatory:$false } - It "Should have PerformanceCounterPath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter PerformanceCounterPath -Type String -Mandatory:$false + It "Should have PerformanceCounterPath as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter PerformanceCounterPath -Type System.String -Mandatory:$false } - It "Should have Interval as a non-mandatory Int32 parameter" { - $CommandUnderTest | Should -HaveParameter Interval -Type Int32 -Mandatory:$false + It "Should have Interval as a non-mandatory System.Int32 parameter" { + $CommandUnderTest | Should -HaveParameter Interval -Type System.Int32 -Mandatory:$false } - It "Should have BeginTime as a non-mandatory DateTime parameter" { - $CommandUnderTest | Should -HaveParameter BeginTime -Type DateTime -Mandatory:$false + It "Should have BeginTime as a non-mandatory System.DateTime parameter" { + $CommandUnderTest | Should -HaveParameter BeginTime -Type System.DateTime -Mandatory:$false } - It "Should have EndTime as a non-mandatory DateTime parameter" { - $CommandUnderTest | Should -HaveParameter EndTime -Type DateTime -Mandatory:$false + It "Should have EndTime as a non-mandatory System.DateTime parameter" { + $CommandUnderTest | Should -HaveParameter EndTime -Type System.DateTime -Mandatory:$false } - It "Should have ConfigPath as a non-mandatory String parameter" { - $CommandUnderTest | Should -HaveParameter ConfigPath -Type String -Mandatory:$false + It "Should have ConfigPath as a non-mandatory System.String parameter" { + $CommandUnderTest | Should -HaveParameter ConfigPath -Type System.String -Mandatory:$false } - It "Should have Summary as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Summary -Type Switch -Mandatory:$false + It "Should have Summary as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Summary -Type System.Management.Automation.Switch -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 Multithread as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Multithread -Type Switch -Mandatory:$false + It "Should have Multithread as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Multithread -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have AllTime as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter AllTime -Type Switch -Mandatory:$false + It "Should have AllTime as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter AllTime -Type System.Management.Automation.Switch -Mandatory:$false } - It "Should have Raw as a non-mandatory Switch" { - $CommandUnderTest | Should -HaveParameter Raw -Type Switch -Mandatory:$false + It "Should have Raw as a non-mandatory System.Management.Automation.Switch parameter" { + $CommandUnderTest | Should -HaveParameter Raw -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/Invoke-DbaQuery.Tests.ps1 b/tests/Invoke-DbaQuery.Tests.ps1 index e8d6dfaf7a..ec49624dc5 100644 --- a/tests/Invoke-DbaQuery.Tests.ps1 +++ b/tests/Invoke-DbaQuery.Tests.ps1 @@ -25,52 +25,52 @@ Describe "Invoke-DbaQuery" { $CommandUnderTest = Get-Command Invoke-DbaQuery } 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 Query parameter" { - $CommandUnderTest | Should -HaveParameter Query -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Query -Type System.String -Mandatory:$false } It "Should have QueryTimeout parameter" { - $CommandUnderTest | Should -HaveParameter QueryTimeout -Type Int32 -Mandatory:$false + $CommandUnderTest | Should -HaveParameter QueryTimeout -Type System.Int32 -Mandatory:$false } It "Should have File parameter" { - $CommandUnderTest | Should -HaveParameter File -Type Object[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter File -Type System.Object[] -Mandatory:$false } It "Should have SqlObject parameter" { - $CommandUnderTest | Should -HaveParameter SqlObject -Type SqlSmoObject[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlObject -Type Microsoft.SqlServer.Management.Smo.SqlSmoObject[] -Mandatory:$false } It "Should have As parameter" { - $CommandUnderTest | Should -HaveParameter As -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter As -Type System.String -Mandatory:$false } It "Should have SqlParameter parameter" { - $CommandUnderTest | Should -HaveParameter SqlParameter -Type PSObject[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlParameter -Type System.Management.Automation.PSObject[] -Mandatory:$false } It "Should have CommandType parameter" { - $CommandUnderTest | Should -HaveParameter CommandType -Type CommandType -Mandatory:$false + $CommandUnderTest | Should -HaveParameter CommandType -Type System.Data.CommandType -Mandatory:$false } It "Should have AppendServerInstance parameter" { - $CommandUnderTest | Should -HaveParameter AppendServerInstance -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter AppendServerInstance -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have MessagesToOutput parameter" { - $CommandUnderTest | Should -HaveParameter MessagesToOutput -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter MessagesToOutput -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have InputObject parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.Database[] -Mandatory:$false } It "Should have ReadOnly parameter" { - $CommandUnderTest | Should -HaveParameter ReadOnly -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter ReadOnly -Type System.Management.Automation.Switch -Mandatory:$false } It "Should have NoExec parameter" { - $CommandUnderTest | Should -HaveParameter NoExec -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter NoExec -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/Invoke-DbaWhoisActive.Tests.ps1 b/tests/Invoke-DbaWhoisActive.Tests.ps1 index 3046f88fed..6352f7aa9e 100644 --- a/tests/Invoke-DbaWhoisActive.Tests.ps1 +++ b/tests/Invoke-DbaWhoisActive.Tests.ps1 @@ -27,85 +27,85 @@ Describe "Invoke-DbaWhoIsActive" { $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 Filter as a parameter" { - $CommandUnderTest | Should -HaveParameter Filter -Type String + $CommandUnderTest | Should -HaveParameter Filter -Type System.String } It "Should have FilterType as a parameter" { - $CommandUnderTest | Should -HaveParameter FilterType -Type String + $CommandUnderTest | Should -HaveParameter FilterType -Type System.String } It "Should have NotFilter as a parameter" { - $CommandUnderTest | Should -HaveParameter NotFilter -Type String + $CommandUnderTest | Should -HaveParameter NotFilter -Type System.String } It "Should have NotFilterType as a parameter" { - $CommandUnderTest | Should -HaveParameter NotFilterType -Type String + $CommandUnderTest | Should -HaveParameter NotFilterType -Type System.String } It "Should have ShowOwnSpid as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ShowOwnSpid -Type Switch + $CommandUnderTest | Should -HaveParameter ShowOwnSpid -Type System.Management.Automation.SwitchParameter } It "Should have ShowSystemSpids as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ShowSystemSpids -Type Switch + $CommandUnderTest | Should -HaveParameter ShowSystemSpids -Type System.Management.Automation.SwitchParameter } It "Should have ShowSleepingSpids as a parameter" { - $CommandUnderTest | Should -HaveParameter ShowSleepingSpids -Type Int32 + $CommandUnderTest | Should -HaveParameter ShowSleepingSpids -Type System.Int32 } It "Should have GetFullInnerText as a switch parameter" { - $CommandUnderTest | Should -HaveParameter GetFullInnerText -Type Switch + $CommandUnderTest | Should -HaveParameter GetFullInnerText -Type System.Management.Automation.SwitchParameter } It "Should have GetPlans as a parameter" { - $CommandUnderTest | Should -HaveParameter GetPlans -Type Int32 + $CommandUnderTest | Should -HaveParameter GetPlans -Type System.Int32 } It "Should have GetOuterCommand as a switch parameter" { - $CommandUnderTest | Should -HaveParameter GetOuterCommand -Type Switch + $CommandUnderTest | Should -HaveParameter GetOuterCommand -Type System.Management.Automation.SwitchParameter } It "Should have GetTransactionInfo as a switch parameter" { - $CommandUnderTest | Should -HaveParameter GetTransactionInfo -Type Switch + $CommandUnderTest | Should -HaveParameter GetTransactionInfo -Type System.Management.Automation.SwitchParameter } It "Should have GetTaskInfo as a parameter" { - $CommandUnderTest | Should -HaveParameter GetTaskInfo -Type Int32 + $CommandUnderTest | Should -HaveParameter GetTaskInfo -Type System.Int32 } It "Should have GetLocks as a switch parameter" { - $CommandUnderTest | Should -HaveParameter GetLocks -Type Switch + $CommandUnderTest | Should -HaveParameter GetLocks -Type System.Management.Automation.SwitchParameter } It "Should have GetAverageTime as a switch parameter" { - $CommandUnderTest | Should -HaveParameter GetAverageTime -Type Switch + $CommandUnderTest | Should -HaveParameter GetAverageTime -Type System.Management.Automation.SwitchParameter } It "Should have GetAdditonalInfo as a switch parameter" { - $CommandUnderTest | Should -HaveParameter GetAdditonalInfo -Type Switch + $CommandUnderTest | Should -HaveParameter GetAdditonalInfo -Type System.Management.Automation.SwitchParameter } It "Should have FindBlockLeaders as a switch parameter" { - $CommandUnderTest | Should -HaveParameter FindBlockLeaders -Type Switch + $CommandUnderTest | Should -HaveParameter FindBlockLeaders -Type System.Management.Automation.SwitchParameter } It "Should have DeltaInterval as a parameter" { - $CommandUnderTest | Should -HaveParameter DeltaInterval -Type Int32 + $CommandUnderTest | Should -HaveParameter DeltaInterval -Type System.Int32 } It "Should have OutputColumnList as a parameter" { - $CommandUnderTest | Should -HaveParameter OutputColumnList -Type String + $CommandUnderTest | Should -HaveParameter OutputColumnList -Type System.String } It "Should have SortOrder as a parameter" { - $CommandUnderTest | Should -HaveParameter SortOrder -Type String + $CommandUnderTest | Should -HaveParameter SortOrder -Type System.String } It "Should have FormatOutput as a parameter" { - $CommandUnderTest | Should -HaveParameter FormatOutput -Type Int32 + $CommandUnderTest | Should -HaveParameter FormatOutput -Type System.Int32 } It "Should have DestinationTable as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationTable -Type String + $CommandUnderTest | Should -HaveParameter DestinationTable -Type System.String } It "Should have ReturnSchema as a switch parameter" { - $CommandUnderTest | Should -HaveParameter ReturnSchema -Type Switch + $CommandUnderTest | Should -HaveParameter ReturnSchema -Type System.Management.Automation.SwitchParameter } It "Should have Schema as a parameter" { - $CommandUnderTest | Should -HaveParameter Schema -Type String + $CommandUnderTest | Should -HaveParameter Schema -Type System.String } It "Should have Help as a switch parameter" { - $CommandUnderTest | Should -HaveParameter Help -Type Switch + $CommandUnderTest | Should -HaveParameter Help -Type System.Management.Automation.SwitchParameter } It "Should have As as a parameter" { - $CommandUnderTest | Should -HaveParameter As -Type String + $CommandUnderTest | Should -HaveParameter As -Type System.String } 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/Invoke-DbaXEReplay.Tests.ps1 b/tests/Invoke-DbaXEReplay.Tests.ps1 index 2af659ea13..148e6fb2fe 100644 --- a/tests/Invoke-DbaXEReplay.Tests.ps1 +++ b/tests/Invoke-DbaXEReplay.Tests.ps1 @@ -16,19 +16,19 @@ Describe "Invoke-DbaXEReplay" { $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 Event parameter" { - $CommandUnderTest | Should -HaveParameter Event -Type String[] + $CommandUnderTest | Should -HaveParameter Event -Type System.String[] } It "Should have InputObject parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type Object + $CommandUnderTest | Should -HaveParameter InputObject -Type System.Object } 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/Invoke-DbatoolsFormatter.Tests.ps1 b/tests/Invoke-DbatoolsFormatter.Tests.ps1 index b5ed185a91..083afb06eb 100644 --- a/tests/Invoke-DbatoolsFormatter.Tests.ps1 +++ b/tests/Invoke-DbatoolsFormatter.Tests.ps1 @@ -44,10 +44,10 @@ function Get-DbaStub { $CommandUnderTest = Get-Command Invoke-DbatoolsFormatter } 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 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/Invoke-DbatoolsRenameHelper.Tests.ps1 b/tests/Invoke-DbatoolsRenameHelper.Tests.ps1 index 94bcf03dc8..bc9443fc62 100644 --- a/tests/Invoke-DbatoolsRenameHelper.Tests.ps1 +++ b/tests/Invoke-DbatoolsRenameHelper.Tests.ps1 @@ -48,13 +48,13 @@ function Get-DbaStub { $CommandUnderTest = Get-Command Invoke-DbatoolsRenameHelper } It "Should have InputObject as a parameter" { - $CommandUnderTest | Should -HaveParameter InputObject -Type System.IO.FileInfo[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.FileInfo[] -Mandatory:$false } It "Should have Encoding as a parameter" { - $CommandUnderTest | Should -HaveParameter Encoding -Type String -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Encoding -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.Switch -Mandatory:$false } } diff --git a/tests/Join-DbaAvailabilityGroup.Tests.ps1 b/tests/Join-DbaAvailabilityGroup.Tests.ps1 index c52765eb58..aeb0454e02 100644 --- a/tests/Join-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Join-DbaAvailabilityGroup.Tests.ps1 @@ -10,22 +10,22 @@ Describe "Join-DbaAvailabilityGroup" { $CommandUnderTest = Get-Command Join-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 ClusterType as a parameter" { - $CommandUnderTest | Should -HaveParameter ClusterType -Type String + $CommandUnderTest | Should -HaveParameter ClusterType -Type System.String } It "Should have InputObject as a parameter" { $CommandUnderTest | Should -HaveParameter InputObject -Type Microsoft.SqlServer.Management.Smo.AvailabilityGroup[] } 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/Join-DbaPath.Tests.ps1 b/tests/Join-DbaPath.Tests.ps1 index 31358d6320..d4d8460a5a 100644 --- a/tests/Join-DbaPath.Tests.ps1 +++ b/tests/Join-DbaPath.Tests.ps1 @@ -10,13 +10,13 @@ Describe "Join-DbaPath" { $CommandUnderTest = Get-Command Join-DbaPath } 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 SqlInstance as a non-mandatory DbaInstanceParameter parameter" { - $CommandUnderTest | Should -HaveParameter SqlInstance -Type DbaInstanceParameter -Mandatory:$false + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter -Mandatory:$false } It "Should have Child as a non-mandatory String[] parameter" { - $CommandUnderTest | Should -HaveParameter Child -Type String[] -Mandatory:$false + $CommandUnderTest | Should -HaveParameter Child -Type System.String[] -Mandatory:$false } } diff --git a/tests/Measure-DbaDbVirtualLogFile.Tests.ps1 b/tests/Measure-DbaDbVirtualLogFile.Tests.ps1 index b4d77131b4..ec82e32999 100644 --- a/tests/Measure-DbaDbVirtualLogFile.Tests.ps1 +++ b/tests/Measure-DbaDbVirtualLogFile.Tests.ps1 @@ -10,23 +10,23 @@ Describe "Measure-DbaDbVirtualLogFile" { BeforeAll { $CommandUnderTest = Get-Command Measure-DbaDbVirtualLogFile } - 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 ExcludeDatabase as a non-mandatory parameter of type Object[]" { - $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type Object[] -Mandatory:$false + It "Should have ExcludeDatabase as a non-mandatory parameter of type System.Object[]" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false } It "Should have IncludeSystemDBs as a non-mandatory switch parameter" { - $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -Type Switch -Mandatory:$false + $CommandUnderTest | Should -HaveParameter IncludeSystemDBs -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/Measure-DbaDiskSpaceRequirement.Tests.ps1 b/tests/Measure-DbaDiskSpaceRequirement.Tests.ps1 index 19fddf2b2e..fea95b89cb 100644 --- a/tests/Measure-DbaDiskSpaceRequirement.Tests.ps1 +++ b/tests/Measure-DbaDiskSpaceRequirement.Tests.ps1 @@ -11,28 +11,28 @@ Describe "Measure-DbaDiskSpaceRequirement" { $CommandUnderTest = Get-Command Measure-DbaDiskSpaceRequirement } 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 Database as a parameter" { - $CommandUnderTest | Should -HaveParameter Database -Type String + $CommandUnderTest | Should -HaveParameter Database -Type System.String } 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 DestinationDatabase as a parameter" { - $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type String + $CommandUnderTest | Should -HaveParameter DestinationDatabase -Type System.String } 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 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/Mount-DbaDatabase.Tests.ps1 b/tests/Mount-DbaDatabase.Tests.ps1 index 895c3b31cd..b4594c75b9 100644 --- a/tests/Mount-DbaDatabase.Tests.ps1 +++ b/tests/Mount-DbaDatabase.Tests.ps1 @@ -12,19 +12,19 @@ Describe "Mount-DbaDatabase" { $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 FileStructure as a parameter" { $CommandUnderTest | Should -HaveParameter FileStructure -Type System.Collections.Specialized.StringCollection } It "Should have DatabaseOwner as a parameter" { - $CommandUnderTest | Should -HaveParameter DatabaseOwner -Type String + $CommandUnderTest | Should -HaveParameter DatabaseOwner -Type System.String } It "Should have AttachOption as a parameter" { - $CommandUnderTest | Should -HaveParameter AttachOption -Type String + $CommandUnderTest | Should -HaveParameter AttachOption -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/Move-DbaDbFile.Tests.ps1 b/tests/Move-DbaDbFile.Tests.ps1 index d85391b9a0..65686877cc 100644 --- a/tests/Move-DbaDbFile.Tests.ps1 +++ b/tests/Move-DbaDbFile.Tests.ps1 @@ -37,34 +37,34 @@ Describe "Move-DbaDbFile" { $CommandUnderTest = Get-Command Move-DbaDbFile } 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 FileType as a parameter" { - $CommandUnderTest | Should -HaveParameter FileType -Type String + $CommandUnderTest | Should -HaveParameter FileType -Type System.String } It "Should have FileDestination as a parameter" { - $CommandUnderTest | Should -HaveParameter FileDestination -Type String + $CommandUnderTest | Should -HaveParameter FileDestination -Type System.String } It "Should have FileToMove as a parameter" { - $CommandUnderTest | Should -HaveParameter FileToMove -Type Hashtable + $CommandUnderTest | Should -HaveParameter FileToMove -Type System.Collections.Hashtable } It "Should have DeleteAfterMove as a switch parameter" { - $CommandUnderTest | Should -HaveParameter DeleteAfterMove -Type Switch + $CommandUnderTest | Should -HaveParameter DeleteAfterMove -Type System.Management.Automation.SwitchParameter } It "Should have FileStructureOnly as a switch parameter" { - $CommandUnderTest | Should -HaveParameter FileStructureOnly -Type Switch + $CommandUnderTest | Should -HaveParameter FileStructureOnly -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/Move-DbaRegServer.Tests.ps1 b/tests/Move-DbaRegServer.Tests.ps1 index 3d3671e0a5..7944926298 100644 --- a/tests/Move-DbaRegServer.Tests.ps1 +++ b/tests/Move-DbaRegServer.Tests.ps1 @@ -6,25 +6,25 @@ Describe "Move-DbaRegServer" { $CommandUnderTest = Get-Command Move-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.Switch } } diff --git a/tests/Set-DbaAgentJobStep.Tests.ps1 b/tests/Set-DbaAgentJobStep.Tests.ps1 index 89a3d2528f..1086a42ded 100644 --- a/tests/Set-DbaAgentJobStep.Tests.ps1 +++ b/tests/Set-DbaAgentJobStep.Tests.ps1 @@ -25,12 +25,12 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { } It "Should have SqlInstance parameter of type DbaInstanceParameter[] and not mandatory" { - (Get-Command $CommandName).Parameters['SqlInstance'].ParameterType.Name | Should -Be 'DbaInstanceParameter[]' + (Get-Command $CommandName).Parameters['SqlInstance'].ParameterType.FullName | Should -Be '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.Name | Should -Be 'PSCredential' + (Get-Command $CommandName).Parameters['SqlCredential'].ParameterType.FullName | Should -Be 'PSCredential' (Get-Command $CommandName).Parameters['SqlCredential'].Attributes.Mandatory | Should -Be $false } diff --git "a/tests/Updated File\357\200\272 Measure-DbaBackupThroughput.Tests.ps1" "b/tests/Updated File\357\200\272 Measure-DbaBackupThroughput.Tests.ps1" new file mode 100644 index 0000000000..e3e5ad0237 --- /dev/null +++ "b/tests/Updated File\357\200\272 Measure-DbaBackupThroughput.Tests.ps1" @@ -0,0 +1,60 @@ +param($ModuleName = 'dbatools') + +Describe "Measure-DbaBackupThroughput" { + BeforeAll { + $CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") + Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan + . "$PSScriptRoot\constants.ps1" + } + + Context "Validate parameters" { + BeforeAll { + $CommandUnderTest = Get-Command Measure-DbaBackupThroughput + } + It "Should have SqlInstance parameter" { + $CommandUnderTest | Should -HaveParameter SqlInstance -Type Dataplat.Dbatools.Parameter.DbaInstanceParameter[] -Mandatory:$false + } + It "Should have SqlCredential parameter" { + $CommandUnderTest | Should -HaveParameter SqlCredential -Type System.Management.Automation.PSCredential -Mandatory:$false + } + It "Should have Database parameter" { + $CommandUnderTest | Should -HaveParameter Database -Type System.Object[] -Mandatory:$false + } + It "Should have ExcludeDatabase parameter" { + $CommandUnderTest | Should -HaveParameter ExcludeDatabase -Type System.Object[] -Mandatory:$false + } + It "Should have Since parameter" { + $CommandUnderTest | Should -HaveParameter Since -Type System.DateTime -Mandatory:$false + } + It "Should have Last parameter" { + $CommandUnderTest | Should -HaveParameter Last -Type System.Management.Automation.Switch -Mandatory:$false + } + It "Should have Type parameter" { + $CommandUnderTest | Should -HaveParameter Type -Type System.String -Mandatory:$false + } + It "Should have DeviceType parameter" { + $CommandUnderTest | Should -HaveParameter DeviceType -Type System.String[] -Mandatory:$false + } + It "Should have EnableException parameter" { + $CommandUnderTest | Should -HaveParameter EnableException -Type System.Management.Automation.Switch -Mandatory:$false + } + } + + Context "Returns output for single database" { + BeforeAll { + $null = Get-DbaProcess -SqlInstance $global:instance2 | Where-Object Program -Match dbatools | Stop-DbaProcess -Confirm:$false -WarningAction SilentlyContinue + $random = Get-Random + $db = "dbatoolsci_measurethruput$random" + $null = New-DbaDatabase -SqlInstance $global:instance2 -Database $db | Backup-DbaDatabase + } + AfterAll { + $null = Remove-DbaDatabase -SqlInstance $global:instance2 -Database $db + } + + It "Should return results" { + $results = Measure-DbaBackupThroughput -SqlInstance $global:instance2 -Database $db + $results.Database | Should -Be $db + $results.BackupCount | Should -Be 1 + } + } +}