@@ -15,6 +15,9 @@ Describe 'Integration Tests' -Tag Integration {
15
15
# $env:GoogleAPIKey = ''
16
16
# $env:BingAPIKey = ''
17
17
# }
18
+ BeforeEach {
19
+ Start-Sleep - Milliseconds (Get-Random - Minimum 550 - Maximum 1550 )
20
+ }
18
21
Context ' Google Maps Function Tests' {
19
22
20
23
Context ' Find-GMapPlace' {
@@ -34,7 +37,7 @@ Describe 'Integration Tests' -Tag Integration {
34
37
$eval.name | Should - BeExactly " Krause's Cafe"
35
38
$eval.Open | Should -Not - BeNullOrEmpty
36
39
$eval.rating | Should -Not - BeNullOrEmpty
37
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
40
+
38
41
} # it
39
42
40
43
} # context_Find-GMapPlace
@@ -64,7 +67,7 @@ Describe 'Integration Tests' -Tag Integration {
64
67
$eval.price_level | Should -Not - BeNullOrEmpty
65
68
$eval.Latitude | Should -Not - BeNullOrEmpty
66
69
$eval.Longitude | Should -Not - BeNullOrEmpty
67
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
70
+
68
71
} # it
69
72
70
73
} # context_Get-GMapPlaceDetails
@@ -78,7 +81,7 @@ Describe 'Integration Tests' -Tag Integration {
78
81
}
79
82
$eval = Invoke-GMapGeoCode @invokeGMapGeoCodeSplat
80
83
($eval.place_id | Measure-Object ).Count | Should - BeGreaterOrEqual 1
81
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
84
+
82
85
} # it
83
86
84
87
It ' should return the expected results for reverse geocoding' {
@@ -89,7 +92,7 @@ Describe 'Integration Tests' -Tag Integration {
89
92
}
90
93
$eval = Invoke-GMapGeoCode @invokeGMapGeoCodeSplat
91
94
($eval.place_id | Measure-Object ).Count | Should - BeGreaterOrEqual 1
92
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
95
+
93
96
} # it
94
97
95
98
It ' should return expected results for place lookup' {
@@ -102,7 +105,7 @@ Describe 'Integration Tests' -Tag Integration {
102
105
$eval.City | Should - BeExactly ' New Braunfels'
103
106
$eval.Latitude | Should -Not - BeNullOrEmpty
104
107
$eval.Longitude | Should -Not - BeNullOrEmpty
105
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
108
+
106
109
} # it
107
110
108
111
} # context_Invoke-GMapGeoCode
@@ -125,7 +128,7 @@ Describe 'Integration Tests' -Tag Integration {
125
128
}
126
129
$eval = Search-GMapNearbyPlace @searchGMapNearbyPlaceSplat
127
130
($eval.place_id | Measure-Object ).Count | Should - BeGreaterOrEqual 2
128
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
131
+
129
132
} # it
130
133
131
134
} # context_Search-GMapNearbyPlace
@@ -147,7 +150,7 @@ Describe 'Integration Tests' -Tag Integration {
147
150
}
148
151
$eval = Search-GMapText @searchGMapTextSplat
149
152
($eval.place_id | Measure-Object ).Count | Should - BeGreaterOrEqual 8
150
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
153
+
151
154
} # it
152
155
153
156
} # context_Search-GMapText
@@ -167,7 +170,7 @@ Describe 'Integration Tests' -Tag Integration {
167
170
}
168
171
$eval = Invoke-BingGeoCode @invokeBingGeoCodeSplat
169
172
($eval.name | Measure-Object ).Count | Should - BeGreaterOrEqual 1
170
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
173
+
171
174
} # it
172
175
173
176
It ' should return the expected results for reverse geocoding' {
@@ -178,7 +181,7 @@ Describe 'Integration Tests' -Tag Integration {
178
181
}
179
182
$eval = Invoke-BingGeoCode @invokeBingGeoCodeSplat
180
183
($eval.name | Measure-Object ).Count | Should - BeGreaterOrEqual 1
181
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
184
+
182
185
} # it
183
186
184
187
} # context_Invoke-GMapGeoCode
@@ -196,7 +199,7 @@ Describe 'Integration Tests' -Tag Integration {
196
199
}
197
200
$eval = Find-BingPlace @findBingPlaceSplat
198
201
($eval.name | Measure-Object ).Count | Should - BeGreaterOrEqual 1
199
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
202
+
200
203
} # it
201
204
202
205
} # context_Find-BingPlace
@@ -214,7 +217,7 @@ Describe 'Integration Tests' -Tag Integration {
214
217
}
215
218
$eval = Search-BingNearbyPlace @searchBingNearbyPlaceSplat
216
219
($eval.name | Measure-Object ).Count | Should - BeGreaterOrEqual 1
217
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
220
+
218
221
} # it
219
222
220
223
} # context_Find-BingPlace
@@ -232,7 +235,7 @@ Describe 'Integration Tests' -Tag Integration {
232
235
$eval.TimeZoneShort | Should - BeExactly ' CST'
233
236
$eval.dstRule.dstStartMonth | Should - BeExactly ' Mar'
234
237
$eval.dstRule.dstEndMonth | Should - BeExactly ' Nov'
235
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
238
+
236
239
} # it
237
240
238
241
It ' should return the expected results for point' {
@@ -247,7 +250,7 @@ Describe 'Integration Tests' -Tag Integration {
247
250
$eval.TimeZoneShort | Should - BeExactly ' CST'
248
251
$eval.dstRule.dstStartMonth | Should - BeExactly ' Mar'
249
252
$eval.dstRule.dstEndMonth | Should - BeExactly ' Nov'
250
- Start-Sleep - Milliseconds ( Get-Random - Minimum 250 - Maximum 1000 )
253
+
251
254
} # it
252
255
253
256
} # context_Find-BingPlace
0 commit comments