@@ -159,8 +159,8 @@ public async Task AddNonDuplicateAreasToDb()
159
159
// Arrange
160
160
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
161
161
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
162
- var deck = await _databaseUtilities . ReadOrNewDeck ( installation . InstallationCode , plant . PlantCode ) ;
163
- var _ = await _databaseUtilities . ReadOrNewArea ( installation . InstallationCode , plant . PlantCode , deck . Name ) ;
162
+ var inspectionArea = await _databaseUtilities . ReadOrNewInspectionArea ( installation . InstallationCode , plant . PlantCode ) ;
163
+ var _ = await _databaseUtilities . ReadOrNewArea ( installation . InstallationCode , plant . PlantCode , inspectionArea . Name ) ;
164
164
165
165
var testPose = new Pose
166
166
{
@@ -182,7 +182,7 @@ public async Task AddNonDuplicateAreasToDb()
182
182
{
183
183
InstallationCode = installation . InstallationCode ,
184
184
PlantCode = plant . PlantCode ,
185
- DeckName = deck . Name ,
185
+ InspectionAreaName = inspectionArea . Name ,
186
186
AreaName = "AddNonDuplicateAreasToDb_Area" ,
187
187
DefaultLocalizationPose = testPose
188
188
} ;
@@ -206,8 +206,8 @@ public async Task AddDuplicateAreasToDb_Fails()
206
206
// Arrange
207
207
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
208
208
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
209
- var deck = await _databaseUtilities . ReadOrNewDeck ( installation . InstallationCode , plant . PlantCode ) ;
210
- var area = await _databaseUtilities . ReadOrNewArea ( installation . InstallationCode , plant . PlantCode , deck . Name ) ;
209
+ var inspectionArea = await _databaseUtilities . ReadOrNewInspectionArea ( installation . InstallationCode , plant . PlantCode ) ;
210
+ var area = await _databaseUtilities . ReadOrNewArea ( installation . InstallationCode , plant . PlantCode , inspectionArea . Name ) ;
211
211
212
212
var testPose = new Pose
213
213
{
@@ -229,7 +229,7 @@ public async Task AddDuplicateAreasToDb_Fails()
229
229
{
230
230
InstallationCode = installation . InstallationCode ,
231
231
PlantCode = plant . PlantCode ,
232
- DeckName = deck . Name ,
232
+ InspectionAreaName = inspectionArea . Name ,
233
233
AreaName = area . Name ,
234
234
DefaultLocalizationPose = testPose
235
235
} ;
@@ -267,7 +267,7 @@ public async Task ScheduleDuplicateCustomMissionDefinitions()
267
267
// Arrange
268
268
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
269
269
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
270
- var deck = await _databaseUtilities . ReadOrNewDeck ( installation . InstallationCode , plant . PlantCode ) ;
270
+ var inspectionArea = await _databaseUtilities . ReadOrNewInspectionArea ( installation . InstallationCode , plant . PlantCode ) ;
271
271
272
272
string testMissionName = "testMissionScheduleDuplicateCustomMissionDefinitions" ;
273
273
@@ -280,7 +280,7 @@ public async Task ScheduleDuplicateCustomMissionDefinitions()
280
280
{
281
281
RobotId = robotId ,
282
282
InstallationCode = installation . InstallationCode ,
283
- InspectionAreaName = deck . Name ,
283
+ InspectionAreaName = inspectionArea . Name ,
284
284
DesiredStartTime = DateTime . SpecifyKind ( new DateTime ( 3050 , 1 , 1 ) , DateTimeKind . Utc ) ,
285
285
InspectionFrequency = new TimeSpan ( 14 , 0 , 0 , 0 ) ,
286
286
Name = testMissionName ,
@@ -342,7 +342,7 @@ public async Task GetNextRun()
342
342
// Arrange - Initialise area
343
343
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
344
344
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
345
- var deck = await _databaseUtilities . ReadOrNewDeck ( installation . InstallationCode , plant . PlantCode ) ;
345
+ var inspectionArea = await _databaseUtilities . ReadOrNewInspectionArea ( installation . InstallationCode , plant . PlantCode ) ;
346
346
347
347
// Arrange - Robot
348
348
var robot = await _databaseUtilities . NewRobot ( RobotStatus . Available , installation ) ;
@@ -354,7 +354,7 @@ public async Task GetNextRun()
354
354
{
355
355
RobotId = robotId ,
356
356
InstallationCode = installation . InstallationCode ,
357
- InspectionAreaName = deck . Name ,
357
+ InspectionAreaName = inspectionArea . Name ,
358
358
DesiredStartTime = DateTime . SpecifyKind ( new DateTime ( 3050 , 1 , 1 ) , DateTimeKind . Utc ) ,
359
359
InspectionFrequency = new TimeSpan ( 14 , 0 , 0 , 0 ) ,
360
360
Name = testMissionName ,
@@ -448,8 +448,8 @@ public async Task ScheduleDuplicatMissionDefinitions()
448
448
// Arrange - Initialise area
449
449
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
450
450
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
451
- var deck = await _databaseUtilities . ReadOrNewDeck ( installation . InstallationCode , plant . PlantCode ) ;
452
- var area = await _databaseUtilities . ReadOrNewArea ( installation . InstallationCode , plant . PlantCode , deck . Name ) ;
451
+ var inspectionArea = await _databaseUtilities . ReadOrNewInspectionArea ( installation . InstallationCode , plant . PlantCode ) ;
452
+ var area = await _databaseUtilities . ReadOrNewArea ( installation . InstallationCode , plant . PlantCode , inspectionArea . Name ) ;
453
453
454
454
// Arrange - Robot
455
455
var robot = await _databaseUtilities . NewRobot ( RobotStatus . Available , installation ) ;
@@ -499,7 +499,7 @@ public async Task MissionDoesNotStartIfRobotIsNotInSameInstallationAsMission()
499
499
// Arrange - Initialise area
500
500
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
501
501
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
502
- var deck = await _databaseUtilities . ReadOrNewDeck ( installation . InstallationCode , plant . PlantCode ) ;
502
+ var inspectionArea = await _databaseUtilities . ReadOrNewInspectionArea ( installation . InstallationCode , plant . PlantCode ) ;
503
503
504
504
string testMissionName = "testMissionDoesNotStartIfRobotIsNotInSameInstallationAsMission" ;
505
505
@@ -516,7 +516,7 @@ public async Task MissionDoesNotStartIfRobotIsNotInSameInstallationAsMission()
516
516
{
517
517
RobotId = robotId ,
518
518
InstallationCode = installation . InstallationCode ,
519
- InspectionAreaName = deck . Name ,
519
+ InspectionAreaName = inspectionArea . Name ,
520
520
DesiredStartTime = DateTime . SpecifyKind ( new DateTime ( 3050 , 1 , 1 ) , DateTimeKind . Utc ) ,
521
521
InspectionFrequency = new TimeSpan ( 14 , 0 , 0 , 0 ) ,
522
522
Name = testMissionName ,
@@ -556,30 +556,30 @@ public async Task MissionDoesNotStartIfRobotIsNotInSameInstallationAsMission()
556
556
}
557
557
558
558
[ Fact ]
559
- public async Task MissionFailsIfRobotIsNotInSameDeckAsMission ( )
559
+ public async Task MissionFailsIfRobotIsNotInSameInspectionAreaAsMission ( )
560
560
{
561
561
// Arrange - Initialise area
562
562
var installation = await _databaseUtilities . ReadOrNewInstallation ( ) ;
563
563
var plant = await _databaseUtilities . ReadOrNewPlant ( installation . InstallationCode ) ;
564
564
565
- string deckName1 = "deckMissionFailsIfRobotIsNotInSameDeckAsMission1 " ;
566
- var deck1 = await _databaseUtilities . NewDeck ( installation . InstallationCode , plant . PlantCode , deckName1 ) ;
565
+ string inspectionAreaName1 = "inspectionAreaMissionFailsIfRobotIsNotInSameInspectionAreaAsMission1 " ;
566
+ var inspectionArea1 = await _databaseUtilities . NewInspectionArea ( installation . InstallationCode , plant . PlantCode , inspectionAreaName1 ) ;
567
567
568
- string deckName2 = "deckMissionFailsIfRobotIsNotInSameDeckAsMission2 " ;
569
- var deck2 = await _databaseUtilities . NewDeck ( installation . InstallationCode , plant . PlantCode , deckName2 ) ;
568
+ string inspectionAreaName2 = "inspectionAreaMissionFailsIfRobotIsNotInSameInspectionAreaAsMission2 " ;
569
+ var inspectionArea2 = await _databaseUtilities . NewInspectionArea ( installation . InstallationCode , plant . PlantCode , inspectionAreaName2 ) ;
570
570
571
- string testMissionName = "testMissionFailsIfRobotIsNotInSameDeckAsMission " ;
571
+ string testMissionName = "testMissionFailsIfRobotIsNotInSameInspectionAreaAsMission " ;
572
572
573
573
// Arrange - Robot
574
- var robot = await _databaseUtilities . NewRobot ( RobotStatus . Available , installation , deck1 ) ;
574
+ var robot = await _databaseUtilities . NewRobot ( RobotStatus . Available , installation , inspectionArea1 ) ;
575
575
string robotId = robot . Id ;
576
576
577
577
// Arrange - Mission Run Query
578
578
var query = new CustomMissionQuery
579
579
{
580
580
RobotId = robotId ,
581
581
InstallationCode = installation . InstallationCode ,
582
- InspectionAreaName = deck2 . Name ,
582
+ InspectionAreaName = inspectionArea2 . Name ,
583
583
DesiredStartTime = DateTime . SpecifyKind ( new DateTime ( 3050 , 1 , 1 ) , DateTimeKind . Utc ) ,
584
584
InspectionFrequency = new TimeSpan ( 14 , 0 , 0 , 0 ) ,
585
585
Name = testMissionName ,
0 commit comments