Skip to content

Commit 2267e99

Browse files
committed
Refactor parameter validation tests to use Should -BeTrue and Should -BeFalse for clarity
1 parent e0c964c commit 2267e99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Unit/Public/Test-SqlDscBackupFile.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,17 @@ Describe 'Test-SqlDscBackupFile' -Tag 'Public' {
104104

105105
It 'Should have mandatory ServerObject parameter' {
106106
$result = (Get-Command -Name 'Test-SqlDscBackupFile').Parameters['ServerObject']
107-
$result.Attributes.Mandatory | Should -Contain $true
107+
$result.Attributes.Mandatory | Should -BeTrue
108108
}
109109

110110
It 'Should have mandatory BackupFile parameter' {
111111
$result = (Get-Command -Name 'Test-SqlDscBackupFile').Parameters['BackupFile']
112-
$result.Attributes.Mandatory | Should -Contain $true
112+
$result.Attributes.Mandatory | Should -BeTrue
113113
}
114114

115115
It 'Should have optional FileNumber parameter' {
116116
$result = (Get-Command -Name 'Test-SqlDscBackupFile').Parameters['FileNumber']
117-
$result.Attributes.Mandatory | Should -Not -Contain $true
117+
$result.Attributes.Mandatory | Should -BeFalse
118118
}
119119

120120
It 'Should output Boolean type' {

0 commit comments

Comments
 (0)