Skip to content

Commit

Permalink
update pester to 5.x (#6536)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Jun 4, 2020
1 parent b2c615b commit 859e7f7
Show file tree
Hide file tree
Showing 17 changed files with 117 additions and 106 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ install:
- git clone https://github.com/wing328/swagger-samples
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
- ps: $PSVersionTable.PSVersion
- ps: Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.3.1
- ps: Install-Module Pester -Force -Scope CurrentUser
build_script:
- dotnet --info
# build C# API client (netcore)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Describe -tag '{{{packageName}}}' -name '{{{apiNamePrefix}}}{{{classname}}}' {
Context '{{{vendorExtensions.x-powershell-method-name}}}' {
It 'Test {{{vendorExtensions.x-powershell-method-name}}}' {
#$TestResult = Invoke-PetApiGetPetById{{#allParams}} -{{{paramName}}} "TEST_VALUE"{{/allParams}}
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Describe -tag '{{{packageName}}}' -name '{{{apiNamePrefix}}}{{{classname}}}' {
It 'Initialize-{{{apiNamePrefix}}}{{{classname}}}' {
# a simple test to create an object
#$NewObject = Initialize-{{{apiNamePrefix}}}{{{classname}}}{{#vars}} -{{name}} "TEST_VALUE"{{/vars}}
#$NewObject | Should BeOfType {{classname}}
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType {{classname}}
#$NewObject.property | Should -Be 0
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions samples/client/petstore/powershell/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,14 @@ src/PSPetstore/Private/PSApiClient.ps1
src/PSPetstore/Private/PSHttpSignatureAuth.ps1
src/PSPetstore/Private/PSRSAEncryptionProvider.cs
src/PSPetstore/en-US/about_PSPetstore.help.txt
tests/Api/PSPetApi.Tests.ps1
tests/Api/PSStoreApi.Tests.ps1
tests/Api/PSUserApi.Tests.ps1
tests/Model/ApiResponse.Tests.ps1
tests/Model/Category.Tests.ps1
tests/Model/InlineObject.Tests.ps1
tests/Model/InlineObject1.Tests.ps1
tests/Model/Order.Tests.ps1
tests/Model/Pet.Tests.ps1
tests/Model/Tag.Tests.ps1
tests/Model/User.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: OpenAPI Generator Team
#
# Generated on: 6/3/20
# Generated on: 6/4/20
#

@{
Expand Down
34 changes: 17 additions & 17 deletions samples/client/petstore/powershell/tests/Api/PSPetApi.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,68 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

Describe -tag 'PSPetstore' -name 'PSPetApi' {
Describe -tag 'PSPetstore' -name 'PSPSPetApi' {
Context 'Add-PSPet' {
It 'Test Add-PSPet' {
#$TestResult = Invoke-PetApiGetPetById -Pet "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Remove-Pet' {
It 'Test Remove-Pet' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -ApiKey "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Find-PSPetsByStatus' {
It 'Test Find-PSPetsByStatus' {
#$TestResult = Invoke-PetApiGetPetById -Status "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Find-PSPetsByTags' {
It 'Test Find-PSPetsByTags' {
#$TestResult = Invoke-PetApiGetPetById -Tags "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Get-PSPetById' {
It 'Test Get-PSPetById' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Update-PSPet' {
It 'Test Update-PSPet' {
#$TestResult = Invoke-PetApiGetPetById -Pet "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Update-PSPetWithForm' {
It 'Test Update-PSPetWithForm' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -Name "TEST_VALUE" -Status "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Invoke-PSUploadFile' {
It 'Test Invoke-PSUploadFile' {
#$TestResult = Invoke-PetApiGetPetById -PetId "TEST_VALUE" -AdditionalMetadata "TEST_VALUE" -File "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

Describe -tag 'PSPetstore' -name 'PSStoreApi' {
Describe -tag 'PSPetstore' -name 'PSPSStoreApi' {
Context 'Remove-PSOrder' {
It 'Test Remove-PSOrder' {
#$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Get-PSInventory' {
It 'Test Get-PSInventory' {
#$TestResult = Invoke-PetApiGetPetById
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Get-PSOrderById' {
It 'Test Get-PSOrderById' {
#$TestResult = Invoke-PetApiGetPetById -OrderId "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Invoke-PSPlaceOrder' {
It 'Test Invoke-PSPlaceOrder' {
#$TestResult = Invoke-PetApiGetPetById -Order "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Expand Down
34 changes: 17 additions & 17 deletions samples/client/petstore/powershell/tests/Api/PSUserApi.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,68 @@
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

Describe -tag 'PSPetstore' -name 'PSUserApi' {
Describe -tag 'PSPetstore' -name 'PSPSUserApi' {
Context 'New-PSUser' {
It 'Test New-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'New-PSUsersWithArrayInput' {
It 'Test New-PSUsersWithArrayInput' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'New-PSUsersWithListInput' {
It 'Test New-PSUsersWithListInput' {
#$TestResult = Invoke-PetApiGetPetById -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Remove-PSUser' {
It 'Test Remove-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Get-PSUserByName' {
It 'Test Get-PSUserByName' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Invoke-PSLoginUser' {
It 'Test Invoke-PSLoginUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" -Password "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Invoke-PSLogoutUser' {
It 'Test Invoke-PSLogoutUser' {
#$TestResult = Invoke-PetApiGetPetById
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Context 'Update-PSUser' {
It 'Test Update-PSUser' {
#$TestResult = Invoke-PetApiGetPetById -Username "TEST_VALUE" -User "TEST_VALUE"
#$TestResult | Should BeOfType TODO
#$TestResult.property | Should Be 0
#$TestResult | Should -BeOfType TODO
#$TestResult.property | Should -Be 0
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSApiResponse' {
It 'Initialize-PSApiResponse' {
# a simple test to create an object
#$NewObject = Initialize-PSApiResponse -Code "TEST_VALUE" -Type "TEST_VALUE" -Message "TEST_VALUE"
#$NewObject | Should BeOfType ApiResponse
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType ApiResponse
#$NewObject.property | Should -Be 0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSCategory' {
It 'Initialize-PSCategory' {
# a simple test to create an object
#$NewObject = Initialize-PSCategory -Id "TEST_VALUE" -Name "TEST_VALUE"
#$NewObject | Should BeOfType Category
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType Category
#$NewObject.property | Should -Be 0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSInlineObject' {
It 'Initialize-PSInlineObject' {
# a simple test to create an object
#$NewObject = Initialize-PSInlineObject -Name "TEST_VALUE" -Status "TEST_VALUE"
#$NewObject | Should BeOfType InlineObject
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType InlineObject
#$NewObject.property | Should -Be 0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSInlineObject1' {
It 'Initialize-PSInlineObject1' {
# a simple test to create an object
#$NewObject = Initialize-PSInlineObject1 -AdditionalMetadata "TEST_VALUE" -File "TEST_VALUE"
#$NewObject | Should BeOfType InlineObject1
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType InlineObject1
#$NewObject.property | Should -Be 0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSOrder' {
It 'Initialize-PSOrder' {
# a simple test to create an object
#$NewObject = Initialize-PSOrder -Id "TEST_VALUE" -PetId "TEST_VALUE" -Quantity "TEST_VALUE" -ShipDate "TEST_VALUE" -Status "TEST_VALUE" -Complete "TEST_VALUE"
#$NewObject | Should BeOfType Order
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType Order
#$NewObject.property | Should -Be 0
}
}
}
4 changes: 2 additions & 2 deletions samples/client/petstore/powershell/tests/Model/Pet.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSPet' {
It 'Initialize-PSPet' {
# a simple test to create an object
#$NewObject = Initialize-PSPet -Id "TEST_VALUE" -Category "TEST_VALUE" -Name "TEST_VALUE" -PhotoUrls "TEST_VALUE" -Tags "TEST_VALUE" -Status "TEST_VALUE"
#$NewObject | Should BeOfType Pet
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType Pet
#$NewObject.property | Should -Be 0
}
}
}
4 changes: 2 additions & 2 deletions samples/client/petstore/powershell/tests/Model/Tag.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSTag' {
It 'Initialize-PSTag' {
# a simple test to create an object
#$NewObject = Initialize-PSTag -Id "TEST_VALUE" -Name "TEST_VALUE"
#$NewObject | Should BeOfType Tag
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType Tag
#$NewObject.property | Should -Be 0
}
}
}
4 changes: 2 additions & 2 deletions samples/client/petstore/powershell/tests/Model/User.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Describe -tag 'PSPetstore' -name 'PSUser' {
It 'Initialize-PSUser' {
# a simple test to create an object
#$NewObject = Initialize-PSUser -Id "TEST_VALUE" -Username "TEST_VALUE" -FirstName "TEST_VALUE" -LastName "TEST_VALUE" -Email "TEST_VALUE" -Password "TEST_VALUE" -Phone "TEST_VALUE" -UserStatus "TEST_VALUE"
#$NewObject | Should BeOfType User
#$NewObject.property | Should Be 0
#$NewObject | Should -BeOfType User
#$NewObject.property | Should -Be 0
}
}
}
Loading

0 comments on commit 859e7f7

Please sign in to comment.