@@ -18,49 +18,53 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
1818 InModuleScope PSSwagger {
1919 Context " Get-PathCommandName Unit Tests" {
2020 It " Get-PathCommandName should return command names with proper verb for VM_CreateOrUpdateWithNounSuffix operationid" {
21- $CommandNames = Get-PathCommandName - OperationId VM_CreateOrUpdateWithNounSuffix | % { $_.name }
21+ $CommandNames = Get-PathCommandName - OperationId VM_CreateOrUpdateWithNounSuffix | Foreach-Object { $_.name }
2222 $CommandNames -CContains ' New-VMWithNounSuffix' | Should Be $True
2323 $CommandNames -CContains ' Set-VMWithNounSuffix' | Should Be $True
2424 }
2525
2626 It " Get-PathCommandName should return command names with proper verb for VM_createorupdatewithnounsuffix operationid" {
27- $CommandNames = Get-PathCommandName - OperationId VM_createorupdatewithnounsuffix | % { $_.name }
27+ $CommandNames = Get-PathCommandName - OperationId VM_createorupdatewithnounsuffix | Foreach-Object { $_.name }
2828 $CommandNames -CContains ' New-VMWithnounsuffix' | Should Be $True
2929 $CommandNames -CContains ' Set-VMWithnounsuffix' | Should Be $True
3030 }
3131
3232 It " Get-PathCommandName should return command name with proper verb for VM_createOrWithNounSuffix operationid" {
33- Get-PathCommandName - OperationId VM_createOrWithNounSuffix | % { $_.name } | Should BeExactly ' New-VMOrWithNounSuffix'
33+ Get-PathCommandName - OperationId VM_createOrWithNounSuffix | Foreach-Object { $_.name } | Should BeExactly ' New-VMOrWithNounSuffix'
3434 }
3535
3636 It " Get-PathCommandName should return command name with proper verb for VM_migrateWithNounSuffix operationid" {
37- Get-PathCommandName - OperationId VM_migrateWithNounSuffix | % { $_.name } | Should BeExactly ' Move-VMWithNounSuffix'
37+ Get-PathCommandName - OperationId VM_migrateWithNounSuffix | Foreach-Object { $_.name } | Should BeExactly ' Move-VMWithNounSuffix'
3838 }
3939
4040 It " Get-PathCommandName should return command name with proper verb for CreateFooResource operationid" {
41- Get-PathCommandName - OperationId CreateFooResource | % { $_.name } | Should BeExactly ' New-FooResource'
41+ Get-PathCommandName - OperationId CreateFooResource | Foreach-Object { $_.name } | Should BeExactly ' New-FooResource'
4242 }
4343
4444 It " Get-PathCommandName should return command names with proper verb for createorupdatebarResource operationid" {
45- $CommandNames = Get-PathCommandName - OperationId createorupdatebarResource | % { $_.name }
45+ $CommandNames = Get-PathCommandName - OperationId createorupdatebarResource | Foreach-Object { $_.name }
4646 $CommandNames -CContains ' New-BarResource' | Should BeExactly $True
4747 $CommandNames -CContains ' Set-BarResource' | Should BeExactly $True
4848 }
4949
5050 It " Get-PathCommandName should return command name with proper verb for anotherFooResource_createFoo operationid" {
51- Get-PathCommandName - OperationId anotherFooResource_createFoo | % { $_.name } | Should BeExactly ' New-AnotherFooResource'
51+ Get-PathCommandName - OperationId anotherFooResource_createFoo | Foreach-Object { $_.name } | Should BeExactly ' New-AnotherFooResource'
5252 }
5353
5454 It " Get-PathCommandName should return command name with proper verb for FooResource_createresource operationid" {
55- Get-PathCommandName - OperationId FooResource_createresource | % { $_.name } | Should BeExactly ' New-FooResource'
55+ Get-PathCommandName - OperationId FooResource_createresource | Foreach-Object { $_.name } | Should BeExactly ' New-FooResource'
5656 }
5757
5858 It " Get-PathCommandName should return proper command name for abcd operationid" {
59- Get-PathCommandName - OperationId abcd | % { $_.name } | Should BeExactly ' Abcd'
59+ Get-PathCommandName - OperationId abcd | Foreach-Object { $_.name } | Should BeExactly ' Abcd'
6060 }
6161
6262 It " Get-PathCommandName with NetworkInterfaces_ListVirtualMachineScaleSetVMNetworkInterfaces" {
63- Get-PathCommandName - OperationId NetworkInterfaces_ListVirtualMachineScaleSetVMNetworkInterfaces | % { $_.name } | Should BeExactly ' Get-VirtualMachineScaleSetVMNetworkInterface'
63+ Get-PathCommandName - OperationId NetworkInterfaces_ListVirtualMachineScaleSetVMNetworkInterfaces | Foreach-Object { $_.name } | Should BeExactly ' Get-VirtualMachineScaleSetVMNetworkInterface'
64+ }
65+
66+ It " Get-PathCommandName with Databases_Pause" {
67+ Get-PathCommandName - OperationId Databases_Pause | ForEach-Object { $_.name } | Should BeExactly ' Suspend-Database'
6468 }
6569 }
6670
0 commit comments