From b99b9fe91cf4897ff15fdcb9e1c15bac30785a69 Mon Sep 17 00:00:00 2001 From: DevCore <62793354+rawi-coding@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:30:52 +0100 Subject: [PATCH] chore: refactored test file structure (#472) --- .../test/train_journey_table_test.dart | 32 +-- .../test/train_journey_test.dart | 8 +- .../train_selection/train_selection.dart | 2 +- .../test/sfera/mapper/sfera_mapper_test.dart | 128 ++++++--- .../SFERA_JP_T1.xml | 0 .../SFERA_SP_T1_1.xml | 0 .../SFERA_SP_T1_2.xml | 0 .../SFERA_SP_T1_3.xml | 0 .../SFERA_SP_T1_4.xml | 0 .../SFERA_SP_T1_5.xml | 0 .../SFERA_JP_T2.xml} | 8 +- .../SFERA_SP_T2_1.xml | 2 +- .../SFERA_SP_T2_2.xml | 2 +- .../SFERA_SP_T2_3.xml | 2 +- .../SFERA_JP_T3.xml} | 4 +- .../SFERA_JP_T3_asp_date_after.xml} | 4 +- .../SFERA_JP_T3_asp_date_before.xml} | 4 +- .../SFERA_JP_T3_asp_no_date.xml} | 4 +- .../SFERA_SP_T3_1.xml} | 2 +- .../SFERA_JP_T5.xml | 0 .../SFERA_SP_T5_1.xml | 0 .../SFERA_TC_T5_1.xml | 0 .../SFERA_JP_T9999.xml} | 12 +- .../T9999_mixed_journey/SFERA_SP_T9999_1.xml | 2 +- .../T9999_mixed_journey/SFERA_SP_T9999_2.xml | 2 +- .../SFERA_SP_T9999_3.xml} | 2 +- .../SFERA_SP_T9999_4.xml} | 2 +- .../SFERA_SP_T9999_5.xml} | 2 +- .../SFERA_JP_T1.xml | 0 .../SFERA_SP_T1_1.xml | 0 .../SFERA_SP_T1_2.xml | 0 .../SFERA_SP_T1_3.xml | 0 .../SFERA_SP_T1_4.xml | 0 .../SFERA_SP_T1_5.xml | 0 .../SFERA_JP_T2.xml} | 8 +- .../SFERA_SP_T2_1.xml | 2 +- .../SFERA_SP_T2_2.xml | 2 +- .../SFERA_SP_T2_3.xml | 2 +- .../SFERA_JP_T3.xml} | 4 +- .../SFERA_SP_T3_1.xml} | 2 +- .../SFERA_JP_T4.xml} | 4 +- .../SFERA_SP_T4_1.xml} | 2 +- .../T5_Breaking_series/SFERA_JP_T5.xml | 35 --- .../T5_Breaking_series/SFERA_SP_T5_1.xml | 252 ------------------ .../T5_Breaking_series/SFERA_TC_T5_1.xml | 8 - .../SFERA_JP_T6.xml} | 6 +- .../SFERA_SP_T6_1.xml} | 2 +- .../SFERA_SP_T6_2.xml} | 2 +- .../SFERA_Event_T9999_1000.xml} | 4 +- .../SFERA_JP_T9999.xml} | 14 +- .../T9999_mixed_journey/SFERA_SP_T9999_1.xml | 2 +- .../T9999_mixed_journey/SFERA_SP_T9999_2.xml | 2 +- .../SFERA_SP_T9999_3.xml} | 2 +- .../SFERA_SP_T9999_4.xml} | 2 +- .../SFERA_SP_T9999_5.xml} | 2 +- .../SFERA_TC_T9999_1.xml} | 2 +- 56 files changed, 165 insertions(+), 420 deletions(-) rename das_client/test_resources/{jp => T1_track_equipment}/SFERA_JP_T1.xml (100%) rename das_client/test_resources/{sp => T1_track_equipment}/SFERA_SP_T1_1.xml (100%) rename das_client/test_resources/{sp => T1_track_equipment}/SFERA_SP_T1_2.xml (100%) rename das_client/test_resources/{sp => T1_track_equipment}/SFERA_SP_T1_3.xml (100%) rename das_client/test_resources/{sp => T1_track_equipment}/SFERA_SP_T1_4.xml (100%) rename das_client/test_resources/{sp => T1_track_equipment}/SFERA_SP_T1_5.xml (100%) rename das_client/test_resources/{jp/SFERA_JP_500.xml => T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml} (94%) rename sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_1.xml => das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml (98%) rename sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_2.xml => das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml (98%) rename sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_3.xml => das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml (99%) rename das_client/test_resources/{jp/SFERA_JP_513.xml => T3_protection_sections/SFERA_JP_T3.xml} (97%) rename das_client/test_resources/{jp/SFERA_JP_513_asp_date_after.xml => T3_protection_sections/SFERA_JP_T3_asp_date_after.xml} (97%) rename das_client/test_resources/{jp/SFERA_JP_513_asp_date_before.xml => T3_protection_sections/SFERA_JP_T3_asp_date_before.xml} (97%) rename das_client/test_resources/{jp/SFERA_JP_513_asp_no_date.xml => T3_protection_sections/SFERA_JP_T3_asp_no_date.xml} (97%) rename das_client/test_resources/{sp/SFERA_SP_513_1.xml => T3_protection_sections/SFERA_SP_T3_1.xml} (99%) rename das_client/test_resources/{jp => T5_breaking_series}/SFERA_JP_T5.xml (100%) rename das_client/test_resources/{sp => T5_breaking_series}/SFERA_SP_T5_1.xml (100%) rename das_client/test_resources/{tc => T5_breaking_series}/SFERA_TC_T5_1.xml (100%) rename das_client/test_resources/{jp/SFERA_JP_9999.xml => T9999_mixed_journey/SFERA_JP_T9999.xml} (81%) rename sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_1.xml => das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml (97%) rename sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_2.xml => das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml (97%) rename das_client/test_resources/{sp/SFERA_SP_9999_3.xml => T9999_mixed_journey/SFERA_SP_T9999_3.xml} (97%) rename das_client/test_resources/{sp/SFERA_SP_9999_4.xml => T9999_mixed_journey/SFERA_SP_T9999_4.xml} (97%) rename das_client/test_resources/{sp/SFERA_SP_9999_5.xml => T9999_mixed_journey/SFERA_SP_T9999_5.xml} (96%) rename sfera-mock/src/main/resources/static_sfera_resources/{T1_Track_equipment => T1_track_equipment}/SFERA_JP_T1.xml (100%) rename sfera-mock/src/main/resources/static_sfera_resources/{T1_Track_equipment => T1_track_equipment}/SFERA_SP_T1_1.xml (100%) rename sfera-mock/src/main/resources/static_sfera_resources/{T1_Track_equipment => T1_track_equipment}/SFERA_SP_T1_2.xml (100%) rename sfera-mock/src/main/resources/static_sfera_resources/{T1_Track_equipment => T1_track_equipment}/SFERA_SP_T1_3.xml (100%) rename sfera-mock/src/main/resources/static_sfera_resources/{T1_Track_equipment => T1_track_equipment}/SFERA_SP_T1_4.xml (100%) rename sfera-mock/src/main/resources/static_sfera_resources/{T1_Track_equipment => T1_track_equipment}/SFERA_SP_T1_5.xml (100%) rename sfera-mock/src/main/resources/static_sfera_resources/{500_ASR_Additional_speed_restrictions/SFERA_JP_500.xml => T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml} (94%) rename das_client/test_resources/sp/SFERA_SP_500_1.xml => sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml (98%) rename das_client/test_resources/sp/SFERA_SP_500_2.xml => sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml (98%) rename das_client/test_resources/sp/SFERA_SP_500_3.xml => sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml (99%) rename sfera-mock/src/main/resources/static_sfera_resources/{513_Protection_sections/SFERA_JP_513.xml => T3_protection_sections/SFERA_JP_T3.xml} (97%) rename sfera-mock/src/main/resources/static_sfera_resources/{513_Protection_sections/SFERA_SP_513_1.xml => T3_protection_sections/SFERA_SP_T3_1.xml} (99%) rename sfera-mock/src/main/resources/static_sfera_resources/{7839_Stop_on_demand/SFERA_JP_7839.xml => T4_Stop_on_demand/SFERA_JP_T4.xml} (92%) rename sfera-mock/src/main/resources/static_sfera_resources/{7839_Stop_on_demand/SFERA_SP_7839_1.xml => T4_Stop_on_demand/SFERA_SP_T4_1.xml} (98%) delete mode 100644 sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_JP_T5.xml delete mode 100644 sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_SP_T5_1.xml delete mode 100644 sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_TC_T5_1.xml rename sfera-mock/src/main/resources/static_sfera_resources/{4816_TAF_TAP_locations/SFERA_JP_4816.xml => T6_TAF_TAP_locations/SFERA_JP_T6.xml} (94%) rename sfera-mock/src/main/resources/static_sfera_resources/{4816_TAF_TAP_locations/SFERA_SP_4816_1.xml => T6_TAF_TAP_locations/SFERA_SP_T6_1.xml} (95%) rename sfera-mock/src/main/resources/static_sfera_resources/{4816_TAF_TAP_locations/SFERA_SP_4816_2.xml => T6_TAF_TAP_locations/SFERA_SP_T6_2.xml} (99%) rename sfera-mock/src/main/resources/static_sfera_resources/{9999_Mixed_journey/SFERA_Event_9999_1000.xml => T9999_mixed_journey/SFERA_Event_T9999_1000.xml} (83%) rename sfera-mock/src/main/resources/static_sfera_resources/{9999_Mixed_journey/SFERA_JP_9999.xml => T9999_mixed_journey/SFERA_JP_T9999.xml} (79%) rename das_client/test_resources/sp/SFERA_SP_9999_1.xml => sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml (97%) rename das_client/test_resources/sp/SFERA_SP_9999_2.xml => sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml (97%) rename sfera-mock/src/main/resources/static_sfera_resources/{9999_Mixed_journey/SFERA_SP_9999_3.xml => T9999_mixed_journey/SFERA_SP_T9999_3.xml} (97%) rename sfera-mock/src/main/resources/static_sfera_resources/{9999_Mixed_journey/SFERA_SP_9999_4.xml => T9999_mixed_journey/SFERA_SP_T9999_4.xml} (97%) rename sfera-mock/src/main/resources/static_sfera_resources/{9999_Mixed_journey/SFERA_SP_9999_5.xml => T9999_mixed_journey/SFERA_SP_T9999_5.xml} (96%) rename sfera-mock/src/main/resources/static_sfera_resources/{9999_Mixed_journey/SFERA_TC_9999_1.xml => T9999_mixed_journey/SFERA_TC_T9999_1.xml} (80%) diff --git a/das_client/integration_test/test/train_journey_table_test.dart b/das_client/integration_test/test/train_journey_table_test.dart index 92351aa8..b804fcd5 100644 --- a/das_client/integration_test/test/train_journey_table_test.dart +++ b/das_client/integration_test/test/train_journey_table_test.dart @@ -23,7 +23,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '4816'); + await _loadTrainJourney(tester, trainNumber: 'T6'); final breakingSeriesHeaderCell = find.byKey(TrainJourney.breakingSeriesHeaderKey); expect(breakingSeriesHeaderCell, findsOneWidget); @@ -84,7 +84,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '7839'); + await _loadTrainJourney(tester, trainNumber: 'T4'); // Open break series bottom sheet await tapElement(tester, find.byKey(TrainJourney.breakingSeriesHeaderKey)); @@ -164,7 +164,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '9999'); + await _loadTrainJourney(tester, trainNumber: 'T9999'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -203,7 +203,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '500'); + await _loadTrainJourney(tester, trainNumber: 'T2'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -232,7 +232,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '500'); + await _loadTrainJourney(tester, trainNumber: 'T2'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -266,7 +266,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '4816'); + await _loadTrainJourney(tester, trainNumber: 'T6'); // List of expected column headers final List expectedHeaders = [ @@ -287,7 +287,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '9999'); + await _loadTrainJourney(tester, trainNumber: 'T9999'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -322,7 +322,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '513'); + await _loadTrainJourney(tester, trainNumber: 'T3'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -387,7 +387,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '4816'); + await _loadTrainJourney(tester, trainNumber: 'T6'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -403,7 +403,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '4816'); + await _loadTrainJourney(tester, trainNumber: 'T6'); // check first train station expect(find.text('Zürich HB'), findsOneWidget); @@ -425,7 +425,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '4816'); + await _loadTrainJourney(tester, trainNumber: 'T6'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -440,7 +440,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '9999'); + await _loadTrainJourney(tester, trainNumber: 'T9999'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -469,7 +469,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '9999'); + await _loadTrainJourney(tester, trainNumber: 'T9999'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -494,7 +494,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '4816'); + await _loadTrainJourney(tester, trainNumber: 'T6'); final glanzenbergText = find .byWidgetPredicate((it) => it is Text && it.data == 'Glanzenberg' && it.style?.fontStyle == FontStyle.italic); @@ -509,7 +509,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '9999'); + await _loadTrainJourney(tester, trainNumber: 'T9999'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); @@ -532,7 +532,7 @@ void main() { await prepareAndStartApp(tester); // load train journey by filling out train selection page - await _loadTrainJourney(tester, trainNumber: '9999'); + await _loadTrainJourney(tester, trainNumber: 'T9999'); final scrollableFinder = find.byType(ListView); expect(scrollableFinder, findsOneWidget); diff --git a/das_client/integration_test/test/train_journey_test.dart b/das_client/integration_test/test/train_journey_test.dart index 31aeb7cd..02fc3c99 100644 --- a/das_client/integration_test/test/train_journey_test.dart +++ b/das_client/integration_test/test/train_journey_test.dart @@ -7,12 +7,12 @@ import '../util/test_utils.dart'; void main() { group('home screen test', () { - testWidgets('load train journey company=1085, train=7839', (tester) async { + testWidgets('load train journey company=1085, train=T9999', (tester) async { // Load app widget. await prepareAndStartApp(tester); - // Verify we have trainnumber with 7839. - expect(find.text('7839'), findsOneWidget); + // Verify we have trainnumber with T9999. + expect(find.text('T9999'), findsOneWidget); // Verify we have ru SBB. expect(find.text(l10n.c_ru_sbb_p), findsOneWidget); @@ -41,7 +41,7 @@ void main() { final trainNumberText = findTextFieldByLabel(l10n.p_train_selection_trainnumber_description); expect(trainNumberText, findsOneWidget); - await enterText(tester, trainNumberText, '4816'); + await enterText(tester, trainNumberText, 'T6'); final primaryButton = find.byWidgetPredicate((widget) => widget is SBBPrimaryButton).first; await tester.tap(primaryButton); diff --git a/das_client/lib/app/pages/journey/train_selection/train_selection.dart b/das_client/lib/app/pages/journey/train_selection/train_selection.dart index 4bb54aa2..ed01fc07 100644 --- a/das_client/lib/app/pages/journey/train_selection/train_selection.dart +++ b/das_client/lib/app/pages/journey/train_selection/train_selection.dart @@ -22,7 +22,7 @@ class _TrainSelectionState extends State { @override void initState() { super.initState(); - _trainNumberController = TextEditingController(text: '7839'); + _trainNumberController = TextEditingController(text: 'T9999'); _dateController = TextEditingController(); context.trainJourneyCubit.updateTrainNumber(_trainNumberController.text); diff --git a/das_client/test/sfera/mapper/sfera_mapper_test.dart b/das_client/test/sfera/mapper/sfera_mapper_test.dart index 861ec74f..cb55e0cb 100644 --- a/das_client/test/sfera/mapper/sfera_mapper_test.dart +++ b/das_client/test/sfera/mapper/sfera_mapper_test.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:das_client/model/journey/additional_speed_restriction_data.dart'; import 'package:das_client/model/journey/cab_signaling.dart'; import 'package:das_client/model/journey/connection_track.dart'; @@ -23,36 +24,51 @@ import 'package:flutter_test/flutter_test.dart'; void main() { Fimber.plantTree(DebugTree()); - List getFilesForSp(String baseName, int count) { + List getFilesForSp(String path, String baseName, int count) { final files = []; for (var i = 1; i <= count; i++) { - files.add(File('test_resources/sp/${baseName}_$i.xml')); + files.add(File('$path/${baseName}_$i.xml')); } return files; } - List getFilesForTc(String baseName, int count) { + List getFilesForTc(String path, String baseName, int count) { final files = []; for (var i = 1; i <= count; i++) { - files.add(File('test_resources/tc/${baseName}_$i.xml')); + files.add(File('$path/${baseName}_$i.xml')); } return files; } - Journey getJourney(String trainNumber, int spCount, {String? spTrainNumber, int tcCount = 0}) { - final journeyFile = File('test_resources/jp/SFERA_JP_$trainNumber.xml'); + Journey getJourney(String trainNumber, int spCount, + {String? spPostfix, String? jpPostfix, String? tcPostfix, int tcCount = 0}) { + final resourceDir = Directory('test_resources'); + expect(resourceDir.existsSync(), true); + + // Filter files that match the regex + final directoryRegex = RegExp('${trainNumber}_.+'); + final testDirectory = resourceDir.listSync().firstWhereOrNull((entry) { + final baseName = entry.path.split(Platform.pathSeparator).last; + return entry is Directory && directoryRegex.hasMatch(baseName); + }); + expect(testDirectory, isNotNull); + + final baseJPFileName = 'SFERA_JP_$trainNumber${jpPostfix != null ? '_$jpPostfix' : ''}'; + final journeyFile = File('${testDirectory!.path}/$baseJPFileName.xml'); final journeyProfile = SferaReplyParser.parse(journeyFile.readAsStringSync()); expect(journeyProfile.validate(), true); - final List segmentProfiles = []; - final List trainCharacteristics = []; - for (final File file in getFilesForSp('SFERA_SP_${spTrainNumber ?? trainNumber}', spCount)) { + final List segmentProfiles = []; + final baseSPFileName = 'SFERA_SP_$trainNumber${spPostfix != null ? '_$spPostfix' : ''}'; + for (final File file in getFilesForSp(testDirectory.path, baseSPFileName, spCount)) { final segmentProfile = SferaReplyParser.parse(file.readAsStringSync()); expect(segmentProfile.validate(), true); segmentProfiles.add(segmentProfile); } - for (final File file in getFilesForTc('SFERA_TC_$trainNumber', tcCount)) { + final List trainCharacteristics = []; + final baseTCFileName = 'SFERA_TC_$trainNumber${tcPostfix != null ? '_$tcPostfix' : ''}'; + for (final File file in getFilesForTc(testDirectory.path, baseTCFileName, tcCount)) { final trainCharacteristic = SferaReplyParser.parse(file.readAsStringSync()); expect(trainCharacteristic.validate(), true); trainCharacteristics.add(trainCharacteristic); @@ -62,13 +78,13 @@ void main() { } test('Test invalid journey on SP missing', () async { - final journey = getJourney('9999', 4); + final journey = getJourney('T9999', 4); expect(journey.valid, false); }); test('Test service point names are resolved correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final servicePoints = journey.data.where((it) => it.type == Datatype.servicePoint).cast().toList(); @@ -83,7 +99,7 @@ void main() { }); test('Test journey data types correctly generated', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); expect(journey.valid, true); expect(journey.data, hasLength(24)); @@ -120,7 +136,7 @@ void main() { }); test('Test kilometre are parsed correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); expect(journey.valid, true); expect(journey.data, hasLength(24)); @@ -158,7 +174,7 @@ void main() { }); test('Test order is generated correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); expect(journey.valid, true); expect(journey.data, hasLength(24)); @@ -200,31 +216,38 @@ void main() { expect(journey.valid, true); expect(journey.metadata.nonStandardTrackEquipmentSegments, hasLength(7)); - expect(journey.metadata.nonStandardTrackEquipmentSegments[0].type, TrackEquipmentType.etcsL2ExtSpeedReversingPossible); + expect( + journey.metadata.nonStandardTrackEquipmentSegments[0].type, TrackEquipmentType.etcsL2ExtSpeedReversingPossible); expect(journey.metadata.nonStandardTrackEquipmentSegments[0].startOrder, isNull); expect(journey.metadata.nonStandardTrackEquipmentSegments[0].endOrder, 1500); - expect(journey.metadata.nonStandardTrackEquipmentSegments[1].type, TrackEquipmentType.etcsL1ls2TracksWithSingleTrackEquipment); + expect(journey.metadata.nonStandardTrackEquipmentSegments[1].type, + TrackEquipmentType.etcsL1ls2TracksWithSingleTrackEquipment); expect(journey.metadata.nonStandardTrackEquipmentSegments[1].startOrder, isNull); expect(journey.metadata.nonStandardTrackEquipmentSegments[1].endOrder, 102300); - expect(journey.metadata.nonStandardTrackEquipmentSegments[2].type, TrackEquipmentType.etcsL2ConvSpeedReversingImpossible); + expect(journey.metadata.nonStandardTrackEquipmentSegments[2].type, + TrackEquipmentType.etcsL2ConvSpeedReversingImpossible); expect(journey.metadata.nonStandardTrackEquipmentSegments[2].startOrder, 102500); expect(journey.metadata.nonStandardTrackEquipmentSegments[2].endOrder, 103700); - expect(journey.metadata.nonStandardTrackEquipmentSegments[3].type, TrackEquipmentType.etcsL2ExtSpeedReversingPossible); + expect( + journey.metadata.nonStandardTrackEquipmentSegments[3].type, TrackEquipmentType.etcsL2ExtSpeedReversingPossible); expect(journey.metadata.nonStandardTrackEquipmentSegments[3].startOrder, 103700); expect(journey.metadata.nonStandardTrackEquipmentSegments[3].endOrder, 307000); - expect(journey.metadata.nonStandardTrackEquipmentSegments[4].type, TrackEquipmentType.etcsL2ConvSpeedReversingImpossible); + expect(journey.metadata.nonStandardTrackEquipmentSegments[4].type, + TrackEquipmentType.etcsL2ConvSpeedReversingImpossible); expect(journey.metadata.nonStandardTrackEquipmentSegments[4].startOrder, 307000); expect(journey.metadata.nonStandardTrackEquipmentSegments[4].endOrder, 307800); - expect(journey.metadata.nonStandardTrackEquipmentSegments[5].type, TrackEquipmentType.etcsL2ExtSpeedReversingImpossible); + expect(journey.metadata.nonStandardTrackEquipmentSegments[5].type, + TrackEquipmentType.etcsL2ExtSpeedReversingImpossible); expect(journey.metadata.nonStandardTrackEquipmentSegments[5].startOrder, 409200); expect(journey.metadata.nonStandardTrackEquipmentSegments[5].endOrder, 410200); - expect(journey.metadata.nonStandardTrackEquipmentSegments[6].type, TrackEquipmentType.etcsL2ExtSpeedReversingPossible); + expect( + journey.metadata.nonStandardTrackEquipmentSegments[6].type, TrackEquipmentType.etcsL2ExtSpeedReversingPossible); expect(journey.metadata.nonStandardTrackEquipmentSegments[6].startOrder, 410200); expect(journey.metadata.nonStandardTrackEquipmentSegments[6].endOrder, isNull); }); test('Test signals are generated correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final signals = journey.data.where((it) => it.type == Datatype.signal).cast().toList(); expect(journey.valid, true); @@ -255,7 +278,7 @@ void main() { }); test('Test curvePoint are generated correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final curvePoints = journey.data.where((it) => it.type == Datatype.curvePoint).cast().toList(); expect(journey.valid, true); @@ -276,7 +299,7 @@ void main() { }); test('Test stop on demand is parsed correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final servicePoints = journey.data.where((it) => it.type == Datatype.servicePoint).cast().toList(); expect(journey.valid, true); @@ -290,7 +313,7 @@ void main() { }); test('Test passing point is parsed correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final servicePoints = journey.data.where((it) => it.type == Datatype.servicePoint).cast().toList(); expect(journey.valid, true); @@ -304,7 +327,7 @@ void main() { }); test('Test station point is parsed correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final servicePoints = journey.data.where((it) => it.type == Datatype.servicePoint).cast().toList(); expect(journey.valid, true); @@ -318,7 +341,7 @@ void main() { }); test('Test bracket stations is parsed correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final servicePoints = journey.data.where((it) => it.type == Datatype.servicePoint).cast().toList(); expect(journey.valid, true); @@ -334,8 +357,9 @@ void main() { }); test('Test protection section is parsed correctly', () async { - final journey = getJourney('513', 1); - final protectionSections = journey.data.where((it) => it.type == Datatype.protectionSection).cast().toList(); + final journey = getJourney('T3', 1); + final protectionSections = + journey.data.where((it) => it.type == Datatype.protectionSection).cast().toList(); expect(journey.valid, true); expect(protectionSections, hasLength(6)); @@ -354,8 +378,11 @@ void main() { }); test('Test additional speed restriction is parsed correctly no items between', () async { - final journey = getJourney('513', 1); - final speedRestrictions = journey.data.where((it) => it.type == Datatype.additionalSpeedRestriction).cast().toList(); + final journey = getJourney('T3', 1); + final speedRestrictions = journey.data + .where((it) => it.type == Datatype.additionalSpeedRestriction) + .cast() + .toList(); expect(journey.valid, true); expect(speedRestrictions, hasLength(1)); @@ -374,8 +401,11 @@ void main() { }); test('Test additional speed restriction is parsed correctly over multiple segments', () async { - final journey = getJourney('500', 3); - final speedRestrictions = journey.data.where((it) => it.type == Datatype.additionalSpeedRestriction).cast().toList(); + final journey = getJourney('T2', 3); + final speedRestrictions = journey.data + .where((it) => it.type == Datatype.additionalSpeedRestriction) + .cast() + .toList(); expect(journey.valid, true); expect(speedRestrictions, hasLength(2)); @@ -401,8 +431,11 @@ void main() { }); test('Test additional speed restriction without a date', () async { - final journey = getJourney('513_asp_no_date', 1, spTrainNumber: '513'); - final speedRestrictions = journey.data.where((it) => it.type == Datatype.additionalSpeedRestriction).cast().toList(); + final journey = getJourney('T3', 1, jpPostfix: 'asp_no_date'); + final speedRestrictions = journey.data + .where((it) => it.type == Datatype.additionalSpeedRestriction) + .cast() + .toList(); expect(journey.valid, true); expect(speedRestrictions, hasLength(1)); @@ -421,8 +454,11 @@ void main() { }); test('Test additional speed restriction with date in the past', () async { - final journey = getJourney('513_asp_date_before', 1, spTrainNumber: '513'); - final speedRestrictions = journey.data.where((it) => it.type == Datatype.additionalSpeedRestriction).cast().toList(); + final journey = getJourney('T3', 1, jpPostfix: 'asp_date_before'); + final speedRestrictions = journey.data + .where((it) => it.type == Datatype.additionalSpeedRestriction) + .cast() + .toList(); expect(journey.valid, true); expect(speedRestrictions, hasLength(0)); @@ -430,8 +466,11 @@ void main() { }); test('Test additional speed restriction with date in the future', () async { - final journey = getJourney('513_asp_date_after', 1, spTrainNumber: '513'); - final speedRestrictions = journey.data.where((it) => it.type == Datatype.additionalSpeedRestriction).cast().toList(); + final journey = getJourney('T3', 1, jpPostfix: 'asp_date_after'); + final speedRestrictions = journey.data + .where((it) => it.type == Datatype.additionalSpeedRestriction) + .cast() + .toList(); expect(journey.valid, true); expect(speedRestrictions, hasLength(0)); @@ -439,7 +478,7 @@ void main() { }); test('Test speed change is parsed correctly', () async { - final journey = getJourney('9999', 5); + final journey = getJourney('T9999', 5); final speedChanges = journey.data.where((it) => it.type == Datatype.speedChange).cast().toList(); expect(journey.valid, true); @@ -467,8 +506,9 @@ void main() { }); test('Test connection tracks are parsed correctly', () async { - final journey = getJourney('9999', 5); - final connectionTracks = journey.data.where((it) => it.type == Datatype.connectionTrack).cast().toList(); + final journey = getJourney('T9999', 5); + final connectionTracks = + journey.data.where((it) => it.type == Datatype.connectionTrack).cast().toList(); expect(journey.valid, true); expect(connectionTracks, hasLength(3)); @@ -490,7 +530,7 @@ void main() { }); test('Test available break series are parsed correctly', () async { - var journey = getJourney('9999', 5); + var journey = getJourney('T9999', 5); expect(journey.valid, true); expect(journey.metadata.availableBreakSeries, hasLength(2)); expect(journey.metadata.availableBreakSeries.elementAt(0).trainSeries, TrainSeries.R); diff --git a/das_client/test_resources/jp/SFERA_JP_T1.xml b/das_client/test_resources/T1_track_equipment/SFERA_JP_T1.xml similarity index 100% rename from das_client/test_resources/jp/SFERA_JP_T1.xml rename to das_client/test_resources/T1_track_equipment/SFERA_JP_T1.xml diff --git a/das_client/test_resources/sp/SFERA_SP_T1_1.xml b/das_client/test_resources/T1_track_equipment/SFERA_SP_T1_1.xml similarity index 100% rename from das_client/test_resources/sp/SFERA_SP_T1_1.xml rename to das_client/test_resources/T1_track_equipment/SFERA_SP_T1_1.xml diff --git a/das_client/test_resources/sp/SFERA_SP_T1_2.xml b/das_client/test_resources/T1_track_equipment/SFERA_SP_T1_2.xml similarity index 100% rename from das_client/test_resources/sp/SFERA_SP_T1_2.xml rename to das_client/test_resources/T1_track_equipment/SFERA_SP_T1_2.xml diff --git a/das_client/test_resources/sp/SFERA_SP_T1_3.xml b/das_client/test_resources/T1_track_equipment/SFERA_SP_T1_3.xml similarity index 100% rename from das_client/test_resources/sp/SFERA_SP_T1_3.xml rename to das_client/test_resources/T1_track_equipment/SFERA_SP_T1_3.xml diff --git a/das_client/test_resources/sp/SFERA_SP_T1_4.xml b/das_client/test_resources/T1_track_equipment/SFERA_SP_T1_4.xml similarity index 100% rename from das_client/test_resources/sp/SFERA_SP_T1_4.xml rename to das_client/test_resources/T1_track_equipment/SFERA_SP_T1_4.xml diff --git a/das_client/test_resources/sp/SFERA_SP_T1_5.xml b/das_client/test_resources/T1_track_equipment/SFERA_SP_T1_5.xml similarity index 100% rename from das_client/test_resources/sp/SFERA_SP_T1_5.xml rename to das_client/test_resources/T1_track_equipment/SFERA_SP_T1_5.xml diff --git a/das_client/test_resources/jp/SFERA_JP_500.xml b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml similarity index 94% rename from das_client/test_resources/jp/SFERA_JP_500.xml rename to das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml index 6ec92ee5..cab2a724 100644 --- a/das_client/test_resources/jp/SFERA_JP_500.xml +++ b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml @@ -5,11 +5,11 @@ 1085 - 500 + T2 2022-01-04 - + 0085 @@ -42,7 +42,7 @@ - + 0085 @@ -85,7 +85,7 @@ - + 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_1.xml b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml similarity index 98% rename from sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_1.xml rename to das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml index 646b2a1c..8f827d9e 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_1.xml +++ b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml @@ -1,7 +1,7 @@ + SP_ID="T2_1" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="90000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_2.xml b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml similarity index 98% rename from sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_2.xml rename to das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml index 7782acb0..3ee3a33b 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_2.xml +++ b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml @@ -1,7 +1,7 @@ + SP_ID="T2_2" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="20000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_3.xml b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml similarity index 99% rename from sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_3.xml rename to das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml index 0fc094d3..eced1f58 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_SP_500_3.xml +++ b/das_client/test_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml @@ -1,7 +1,7 @@ + SP_ID="T2_3" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="20000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/jp/SFERA_JP_513.xml b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3.xml similarity index 97% rename from das_client/test_resources/jp/SFERA_JP_513.xml rename to das_client/test_resources/T3_protection_sections/SFERA_JP_T3.xml index 124c7628..75a78958 100644 --- a/das_client/test_resources/jp/SFERA_JP_513.xml +++ b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3.xml @@ -5,11 +5,11 @@ 1085 - 513 + T3 2022-01-04 - + 0085 diff --git a/das_client/test_resources/jp/SFERA_JP_513_asp_date_after.xml b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_date_after.xml similarity index 97% rename from das_client/test_resources/jp/SFERA_JP_513_asp_date_after.xml rename to das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_date_after.xml index e46b99f1..535bc6de 100644 --- a/das_client/test_resources/jp/SFERA_JP_513_asp_date_after.xml +++ b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_date_after.xml @@ -5,11 +5,11 @@ 1085 - 513 + T3 2022-01-04 - + 0085 diff --git a/das_client/test_resources/jp/SFERA_JP_513_asp_date_before.xml b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_date_before.xml similarity index 97% rename from das_client/test_resources/jp/SFERA_JP_513_asp_date_before.xml rename to das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_date_before.xml index 226b0bcd..d9370665 100644 --- a/das_client/test_resources/jp/SFERA_JP_513_asp_date_before.xml +++ b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_date_before.xml @@ -5,11 +5,11 @@ 1085 - 513 + T3 2022-01-04 - + 0085 diff --git a/das_client/test_resources/jp/SFERA_JP_513_asp_no_date.xml b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_no_date.xml similarity index 97% rename from das_client/test_resources/jp/SFERA_JP_513_asp_no_date.xml rename to das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_no_date.xml index 4872fa1d..ad018dad 100644 --- a/das_client/test_resources/jp/SFERA_JP_513_asp_no_date.xml +++ b/das_client/test_resources/T3_protection_sections/SFERA_JP_T3_asp_no_date.xml @@ -5,11 +5,11 @@ 1085 - 513 + T3 2022-01-04 - + 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_513_1.xml b/das_client/test_resources/T3_protection_sections/SFERA_SP_T3_1.xml similarity index 99% rename from das_client/test_resources/sp/SFERA_SP_513_1.xml rename to das_client/test_resources/T3_protection_sections/SFERA_SP_T3_1.xml index 382f2319..a409abaa 100644 --- a/das_client/test_resources/sp/SFERA_SP_513_1.xml +++ b/das_client/test_resources/T3_protection_sections/SFERA_SP_T3_1.xml @@ -1,7 +1,7 @@ + SP_ID="T3_1" SP_VersionMajor="1" SP_VersionMinor="4" SP_Length="90000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/jp/SFERA_JP_T5.xml b/das_client/test_resources/T5_breaking_series/SFERA_JP_T5.xml similarity index 100% rename from das_client/test_resources/jp/SFERA_JP_T5.xml rename to das_client/test_resources/T5_breaking_series/SFERA_JP_T5.xml diff --git a/das_client/test_resources/sp/SFERA_SP_T5_1.xml b/das_client/test_resources/T5_breaking_series/SFERA_SP_T5_1.xml similarity index 100% rename from das_client/test_resources/sp/SFERA_SP_T5_1.xml rename to das_client/test_resources/T5_breaking_series/SFERA_SP_T5_1.xml diff --git a/das_client/test_resources/tc/SFERA_TC_T5_1.xml b/das_client/test_resources/T5_breaking_series/SFERA_TC_T5_1.xml similarity index 100% rename from das_client/test_resources/tc/SFERA_TC_T5_1.xml rename to das_client/test_resources/T5_breaking_series/SFERA_TC_T5_1.xml diff --git a/das_client/test_resources/jp/SFERA_JP_9999.xml b/das_client/test_resources/T9999_mixed_journey/SFERA_JP_T9999.xml similarity index 81% rename from das_client/test_resources/jp/SFERA_JP_9999.xml rename to das_client/test_resources/T9999_mixed_journey/SFERA_JP_T9999.xml index 591be207..ff2b2dd0 100644 --- a/das_client/test_resources/jp/SFERA_JP_9999.xml +++ b/das_client/test_resources/T9999_mixed_journey/SFERA_JP_T9999.xml @@ -5,11 +5,11 @@ 1085 - 9999 + T9999 2022-01-04 - + 0085 @@ -19,7 +19,7 @@ - + 0085 @@ -29,7 +29,7 @@ - + 0085 @@ -42,7 +42,7 @@ - + 0085 @@ -52,7 +52,7 @@ - + 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_1.xml b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml similarity index 97% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_1.xml rename to das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml index 67af050b..1d591364 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_1.xml +++ b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_1" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_2.xml b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml similarity index 97% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_2.xml rename to das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml index cb0ee7b2..dff7066e 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_2.xml +++ b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_2" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_9999_3.xml b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml similarity index 97% rename from das_client/test_resources/sp/SFERA_SP_9999_3.xml rename to das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml index 8e2cedea..c021cf8f 100644 --- a/das_client/test_resources/sp/SFERA_SP_9999_3.xml +++ b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_3" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_9999_4.xml b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_4.xml similarity index 97% rename from das_client/test_resources/sp/SFERA_SP_9999_4.xml rename to das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_4.xml index 3b787415..e8f0ecf4 100644 --- a/das_client/test_resources/sp/SFERA_SP_9999_4.xml +++ b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_4.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_4" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_9999_5.xml b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml similarity index 96% rename from das_client/test_resources/sp/SFERA_SP_9999_5.xml rename to das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml index 5d5e89f1..7d2e5c6e 100644 --- a/das_client/test_resources/sp/SFERA_SP_9999_5.xml +++ b/das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_5" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_JP_T1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_JP_T1.xml similarity index 100% rename from sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_JP_T1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_JP_T1.xml diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_1.xml similarity index 100% rename from sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_1.xml diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_2.xml b/sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_2.xml similarity index 100% rename from sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_2.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_2.xml diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_3.xml b/sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_3.xml similarity index 100% rename from sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_3.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_3.xml diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_4.xml b/sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_4.xml similarity index 100% rename from sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_4.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_4.xml diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_5.xml b/sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_5.xml similarity index 100% rename from sfera-mock/src/main/resources/static_sfera_resources/T1_Track_equipment/SFERA_SP_T1_5.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T1_track_equipment/SFERA_SP_T1_5.xml diff --git a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_JP_500.xml b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml similarity index 94% rename from sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_JP_500.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml index 27be88aa..2411409a 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/500_ASR_Additional_speed_restrictions/SFERA_JP_500.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_JP_T2.xml @@ -5,11 +5,11 @@ 1085 - 500 + T2 2022-01-04 - + 0085 @@ -42,7 +42,7 @@ - + 0085 @@ -85,7 +85,7 @@ - + 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_500_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml similarity index 98% rename from das_client/test_resources/sp/SFERA_SP_500_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml index 646b2a1c..8f827d9e 100644 --- a/das_client/test_resources/sp/SFERA_SP_500_1.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_1.xml @@ -1,7 +1,7 @@ + SP_ID="T2_1" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="90000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_500_2.xml b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml similarity index 98% rename from das_client/test_resources/sp/SFERA_SP_500_2.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml index 7782acb0..3ee3a33b 100644 --- a/das_client/test_resources/sp/SFERA_SP_500_2.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_2.xml @@ -1,7 +1,7 @@ + SP_ID="T2_2" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="20000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_500_3.xml b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml similarity index 99% rename from das_client/test_resources/sp/SFERA_SP_500_3.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml index 0fc094d3..eced1f58 100644 --- a/das_client/test_resources/sp/SFERA_SP_500_3.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T2_ASR_additional_speed_restrictions/SFERA_SP_T2_3.xml @@ -1,7 +1,7 @@ + SP_ID="T2_3" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="20000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/513_Protection_sections/SFERA_JP_513.xml b/sfera-mock/src/main/resources/static_sfera_resources/T3_protection_sections/SFERA_JP_T3.xml similarity index 97% rename from sfera-mock/src/main/resources/static_sfera_resources/513_Protection_sections/SFERA_JP_513.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T3_protection_sections/SFERA_JP_T3.xml index d60fb62c..cc529294 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/513_Protection_sections/SFERA_JP_513.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T3_protection_sections/SFERA_JP_T3.xml @@ -5,11 +5,11 @@ 1085 - 513 + T3 2022-01-04 - + 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/513_Protection_sections/SFERA_SP_513_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T3_protection_sections/SFERA_SP_T3_1.xml similarity index 99% rename from sfera-mock/src/main/resources/static_sfera_resources/513_Protection_sections/SFERA_SP_513_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T3_protection_sections/SFERA_SP_T3_1.xml index 382f2319..a409abaa 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/513_Protection_sections/SFERA_SP_513_1.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T3_protection_sections/SFERA_SP_T3_1.xml @@ -1,7 +1,7 @@ + SP_ID="T3_1" SP_VersionMajor="1" SP_VersionMinor="4" SP_Length="90000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/7839_Stop_on_demand/SFERA_JP_7839.xml b/sfera-mock/src/main/resources/static_sfera_resources/T4_Stop_on_demand/SFERA_JP_T4.xml similarity index 92% rename from sfera-mock/src/main/resources/static_sfera_resources/7839_Stop_on_demand/SFERA_JP_7839.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T4_Stop_on_demand/SFERA_JP_T4.xml index 4ae42fb7..aea78810 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/7839_Stop_on_demand/SFERA_JP_7839.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T4_Stop_on_demand/SFERA_JP_T4.xml @@ -5,11 +5,11 @@ 1085 - 7839 + T4 2022-01-04 - + 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/7839_Stop_on_demand/SFERA_SP_7839_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T4_Stop_on_demand/SFERA_SP_T4_1.xml similarity index 98% rename from sfera-mock/src/main/resources/static_sfera_resources/7839_Stop_on_demand/SFERA_SP_7839_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T4_Stop_on_demand/SFERA_SP_T4_1.xml index f4e741bb..2b8cfacf 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/7839_Stop_on_demand/SFERA_SP_7839_1.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T4_Stop_on_demand/SFERA_SP_T4_1.xml @@ -1,7 +1,7 @@ + SP_ID="T4_1" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="41500" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_JP_T5.xml b/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_JP_T5.xml deleted file mode 100644 index 59c002c1..00000000 --- a/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_JP_T5.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - 1085 - T5 - 2022-01-04 - - - - - 0085 - - - - - - - - - - - - - - - - - - 1185 - - - diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_SP_T5_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_SP_T5_1.xml deleted file mode 100644 index 778f64ca..00000000 --- a/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_SP_T5_1.xml +++ /dev/null @@ -1,252 +0,0 @@ - - - - 0085 - - - - - - CH - 3002 - - - - - - - CH - 3003 - - - - - - - CH - 3004 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CH - 3002 - - - - - - - - - - CH - 3003 - - - - - - - - - - CH - 3004 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_TC_T5_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_TC_T5_1.xml deleted file mode 100644 index 51ce7bf2..00000000 --- a/sfera-mock/src/main/resources/static_sfera_resources/T5_Breaking_series/SFERA_TC_T5_1.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - 1185 - - - diff --git a/sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_JP_4816.xml b/sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_JP_T6.xml similarity index 94% rename from sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_JP_4816.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_JP_T6.xml index 86f403aa..b440393f 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_JP_4816.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_JP_T6.xml @@ -5,11 +5,11 @@ 1085 - 4816 + T6 2022-01-04 - + 0085 @@ -24,7 +24,7 @@ - + 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_SP_4816_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_SP_T6_1.xml similarity index 95% rename from sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_SP_4816_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_SP_T6_1.xml index a072c500..f7accdae 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_SP_4816_1.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_SP_T6_1.xml @@ -1,7 +1,7 @@ + SP_ID="T6_1" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="41500" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_SP_4816_2.xml b/sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_SP_T6_2.xml similarity index 99% rename from sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_SP_4816_2.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_SP_T6_2.xml index f601adc0..58667862 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/4816_TAF_TAP_locations/SFERA_SP_4816_2.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T6_TAF_TAP_locations/SFERA_SP_T6_2.xml @@ -1,7 +1,7 @@ + SP_ID="T6_2" SP_VersionMajor="1" SP_VersionMinor="1" SP_Length="41500" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_Event_9999_1000.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_Event_T9999_1000.xml similarity index 83% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_Event_9999_1000.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_Event_T9999_1000.xml index 02d2821b..621fdb32 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_Event_9999_1000.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_Event_T9999_1000.xml @@ -5,12 +5,12 @@ 1085 - 9999 + T9999 2022-01-04 - + 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_JP_9999.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_JP_T9999.xml similarity index 79% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_JP_9999.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_JP_T9999.xml index 69ddc7b3..46815a11 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_JP_9999.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_JP_T9999.xml @@ -5,11 +5,11 @@ 1085 - 9999 + T9999 2022-01-04 - + 0085 @@ -18,11 +18,11 @@ - + 1085 - + 0085 @@ -32,7 +32,7 @@ - + 0085 @@ -45,7 +45,7 @@ - + 0085 @@ -55,7 +55,7 @@ - + 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_9999_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml similarity index 97% rename from das_client/test_resources/sp/SFERA_SP_9999_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml index 67af050b..1d591364 100644 --- a/das_client/test_resources/sp/SFERA_SP_9999_1.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_1" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/das_client/test_resources/sp/SFERA_SP_9999_2.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml similarity index 97% rename from das_client/test_resources/sp/SFERA_SP_9999_2.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml index cb0ee7b2..dff7066e 100644 --- a/das_client/test_resources/sp/SFERA_SP_9999_2.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_2.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_2" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_3.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml similarity index 97% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_3.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml index 8e2cedea..c021cf8f 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_3.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_3" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_4.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_4.xml similarity index 97% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_4.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_4.xml index 3b787415..e8f0ecf4 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_4.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_4.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_4" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_5.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml similarity index 96% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_5.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml index eeace121..a54abdac 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_SP_9999_5.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml @@ -1,7 +1,7 @@ + SP_ID="T9999_5" SP_VersionMajor="1" SP_VersionMinor="0" SP_Length="1000" SP_Status="Valid"> 0085 diff --git a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_TC_9999_1.xml b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_TC_T9999_1.xml similarity index 80% rename from sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_TC_9999_1.xml rename to sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_TC_T9999_1.xml index 3c4e44b9..5b0b6a71 100644 --- a/sfera-mock/src/main/resources/static_sfera_resources/9999_Mixed_journey/SFERA_TC_9999_1.xml +++ b/sfera-mock/src/main/resources/static_sfera_resources/T9999_mixed_journey/SFERA_TC_T9999_1.xml @@ -1,7 +1,7 @@ + TC_ID="T9999_1" TC_VersionMajor="1" TC_VersionMinor="0"> 1085