File tree 2 files changed +4
-4
lines changed 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public async Task MissionIsCreatedInArea()
146
146
Assert . True ( robotResponse . IsSuccessStatusCode ) ;
147
147
var robots = await robotResponse . Content . ReadFromJsonAsync < List < Robot > > ( _serializerOptions ) ;
148
148
Assert . True ( robots != null ) ;
149
- var robot = robots [ 0 ] ;
149
+ var robot = robots . Where ( robot => robot . Name == "Shockwave" ) . First ( ) ;
150
150
string robotId = robot . Id ;
151
151
152
152
// Installation
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ public async Task ScheduleOneEchoMissionTest()
234
234
Assert . True ( response . IsSuccessStatusCode , $ "Failed to get robot from path: { robotUrl } , with status code { response . StatusCode } ") ;
235
235
var robots = await response . Content . ReadFromJsonAsync < List < Robot > > ( _serializerOptions ) ;
236
236
Assert . True ( robots != null ) ;
237
- var robot = robots [ 0 ] ; // We do not care which robot is used
237
+ var robot = robots . Where ( robot => robot . Name == "Shockwave" ) . First ( ) ;
238
238
string robotId = robot . Id ;
239
239
240
240
// Arrange - Area
@@ -281,7 +281,7 @@ public async Task Schedule3EchoMissionsTest()
281
281
Assert . True ( robotResponse . IsSuccessStatusCode ) ;
282
282
var robots = await robotResponse . Content . ReadFromJsonAsync < List < Robot > > ( _serializerOptions ) ;
283
283
Assert . True ( robots != null ) ;
284
- var robot = robots [ 0 ] ;
284
+ var robot = robots . Where ( robot => robot . Name == "Shockwave" ) . First ( ) ;
285
285
string robotId = robot . Id ;
286
286
287
287
// Arrange - Area
@@ -624,7 +624,7 @@ public async Task ScheduleDuplicateEchoMissionDefinitions()
624
624
Assert . True ( response . IsSuccessStatusCode ) ;
625
625
var robots = await response . Content . ReadFromJsonAsync < List < Robot > > ( _serializerOptions ) ;
626
626
Assert . True ( robots != null ) ;
627
- var robot = robots [ 0 ] ;
627
+ var robot = robots . Where ( robot => robot . Name == "Shockwave" ) . First ( ) ;
628
628
string robotId = robot . Id ;
629
629
int echoMissionId = 1 ; // Corresponds to mock in EchoServiceMock.cs
630
630
You can’t perform that action at this time.
0 commit comments