You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$HS[0]["Url"] | Should -Be "http://{server}.swagger.io:{port}/v2"
144
-
$HS[0]["Description"] | Should -Be "petstore server"
145
-
$HS[0]["Variables"]["server"]["Description"] | Should -Be "No description provided"
146
-
$HS[0]["Variables"]["server"]["DefaultValue"] | Should -Be "petstore"
147
-
$HS[0]["Variables"]["server"]["EnumValues"] | Should -Be @("petstore",
143
+
$HS[1]["Url"] | Should -Be "http://{server}.swagger.io:{port}/v2"
144
+
$HS[1]["Description"] | Should -Be "petstore server"
145
+
$HS[1]["Variables"]["server"]["Description"] | Should -Be "No description provided"
146
+
$HS[1]["Variables"]["server"]["DefaultValue"] | Should -Be "petstore"
147
+
$HS[1]["Variables"]["server"]["EnumValues"] | Should -Be @("petstore",
148
148
"qa-petstore",
149
149
"dev-petstore")
150
150
151
151
}
152
152
153
153
It "Get-PSUrlFromHostSetting tests" {
154
-
Get-PSUrlFromHostSetting-Index 0| Should -Be "http://petstore.swagger.io:80/v2"
155
-
Get-PSUrlFromHostSetting-Index 0-Variables @{ "port"="8080" } | Should -Be "http://petstore.swagger.io:8080/v2"
154
+
Get-PSUrlFromHostSetting-Index 1| Should -Be "http://petstore.swagger.io:80/v2"
155
+
Get-PSUrlFromHostSetting-Index 1-Variables @{ "port"="8080" } | Should -Be "http://petstore.swagger.io:8080/v2"
156
156
#Get-PSUrlFromHostSetting -Index 2 | Should -Throw -ExceptionType ([RuntimeException])
157
157
#Get-PSUrlFromHostSetting -Index 2 -ErrorAction Stop | Should -Throw "RuntimeException: Invalid index 2 when selecting the host. Must -Be less than 2"
158
158
#Get-PSUrlFromHostSetting -Index 0 -Variables @{ "port" = "1234" } -ErrorAction Stop | Should -Throw "RuntimeException: The variable 'port' in the host URL has invalid value 1234. Must -Be 80,8080"
0 commit comments