@@ -15,6 +15,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Pat
1515 {
1616 // Arrange
1717 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
18+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
1819
1920 // Act
2021 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -31,6 +32,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Ver
3132 {
3233 // Arrange
3334 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
35+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
3436
3537 // Act
3638 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -49,6 +51,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Tag
4951 {
5052 // Arrange
5153 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
54+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
5255
5356 // Act
5457 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -71,6 +74,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Val
7174 {
7275 // Arrange
7376 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
77+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
7478
7579 // Act
7680 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -90,6 +94,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Arr
9094 {
9195 // Arrange
9296 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
97+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
9398
9499 // Act
95100 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -109,6 +114,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Pat
109114 {
110115 // Arrange
111116 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
117+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
112118
113119 // Act
114120 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -131,6 +137,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Obj
131137 {
132138 // Arrange
133139 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
140+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
134141
135142 // Act
136143 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -152,6 +159,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Res
152159 {
153160 // Arrange
154161 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
162+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
155163
156164 // Act
157165 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -189,6 +197,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Sch
189197 {
190198 // Arrange
191199 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
200+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
192201
193202 // Act
194203 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -205,6 +214,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Mod
205214 {
206215 // Arrange
207216 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
217+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
208218
209219 // Act
210220 var json = await httpClient . GetStringAsync ( "/swagger/v1.0.0/swagger.json" ) ;
@@ -219,11 +229,12 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Mod
219229
220230 [ Theory ]
221231 [ MemberData ( nameof ( AttributeData ) ) ]
222- public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Required
223- ( string attribute , bool isRequired , string type )
232+ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Required ( string attribute , bool isRequired , string type )
224233 {
225234 // Arrange
226235 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
236+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
237+
227238 var isReq = isRequired ;
228239 var typeStr = type ;
229240
@@ -242,11 +253,12 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Req
242253
243254 [ Theory ]
244255 [ MemberData ( nameof ( AttributeData ) ) ]
245- public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Property
246- ( string attribute , bool isRequired , string type )
256+ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Property ( string attribute , bool isRequired , string type )
247257 {
248258 // Arrange
249259 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
260+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
261+
250262 var isReq = isRequired ;
251263 var typeStr = type ;
252264
@@ -265,11 +277,12 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Pro
265277
266278 [ Theory ]
267279 [ MemberData ( nameof ( AttributeData ) ) ]
268- public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Type
269- ( string attribute , bool isRequired , string type )
280+ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Type ( string attribute , bool isRequired , string type )
270281 {
271282 // Arrange
272283 using var httpClient = host . App ! . CreateHttpClient ( "apiapp" ) ;
284+ await host . ResourceNotificationService . WaitForResourceAsync ( "apiapp" , KnownResourceStates . Running ) . WaitAsync ( TimeSpan . FromSeconds ( 30 ) ) ;
285+
273286 var isReq = isRequired ;
274287 var typeStr = type ;
275288
0 commit comments