use of eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementResponse in project UVMS-Docker by UnionVMS.
the class MovementJmsIT method createRouteAddPositionsInRandomOrder.
@Test
public void createRouteAddPositionsInRandomOrder() throws Exception {
// currently there is no way to check if randomly added positions
// actually is processed ok
// so we say its ok just to add them for now . . .
int NUMBER_OF_POSITIONS = 5;
Asset testAsset = AssetTestHelper.createTestAsset();
MobileTerminalType mobileTerminalType = MobileTerminalTestHelper.createMobileTerminalType();
MobileTerminalTestHelper.assignMobileTerminal(testAsset, mobileTerminalType);
List<LatLong> route = movementHelper.createRuttVarbergGrena(NUMBER_OF_POSITIONS);
// shake the content so it is not in a deterministic order
List<LatLong> routeBeforeShake = new ArrayList<>(route);
Collections.shuffle(route);
List<CreateMovementResponse> fromAPI = new ArrayList<>();
for (LatLong position : route) {
final CreateMovementRequest createMovementRequest = movementHelper.createMovementRequest(testAsset, mobileTerminalType, position);
CreateMovementResponse createMovementResponse = movementHelper.createMovement(testAsset, mobileTerminalType, createMovementRequest);
assertNotNull(createMovementResponse);
assertNotNull(createMovementResponse.getMovement());
assertNotNull(createMovementResponse.getMovement().getPosition());
fromAPI.add(createMovementResponse);
}
}
use of eu.europa.ec.fisheries.schema.movement.module.v1.CreateMovementResponse in project UVMS-Docker by UnionVMS.
the class MovementJmsIT method createRouteTestTitanic.
@Test
public void createRouteTestTitanic() throws Exception {
Asset testAsset = AssetTestHelper.createTestAsset();
MobileTerminalType mobileTerminalType = MobileTerminalTestHelper.createMobileTerminalType();
MobileTerminalTestHelper.assignMobileTerminal(testAsset, mobileTerminalType);
List<LatLong> route = movementHelper.createRuttCobhNewYork(-1, 0.4f);
for (LatLong position : route) {
final CreateMovementRequest createMovementRequest = movementHelper.createMovementRequest(testAsset, mobileTerminalType, position);
CreateMovementResponse createMovementResponse = movementHelper.createMovement(testAsset, mobileTerminalType, createMovementRequest);
assertNotNull(createMovementResponse);
}
}
Aggregations