public void initUserRaceDate() { getTestUtilDao() .createUserRace( TEST_VR_USER_ID, TEST_RACE_ID, TEST_MODE, TEST_USER_SERVICE, TEST_ZEZO_URL_TEMPLATE); userRaceTest = new UserRace(); userRaceTest.setVrUserId(TEST_VR_USER_ID); userRaceTest.setRaceId(TEST_RACE_ID); userRaceTest.setMode(TEST_MODE); userRaceTest.setUserService(TEST_USER_SERVICE); userRaceTest.setZezoUrlTemplate(TEST_ZEZO_URL_TEMPLATE); }
@Override public void launchMonitoringJob(List<UserRace> userRaces) { logger.debug("launch Monitoring Job"); for (UserRace userRace : userRaces) { // Retrieve last position, new position and save new position BoatsPositionWrapper boatsPositionWrapper = serviceBoatInfo.retrieveBoatPosition(userRace.getVrUserId(), userRace.getRaceId()); // If same square and routing, skipping monitoring // Check if need to change sail // Check speed thresold } }
@Test public void create_ShouldReturnOne() { // set up UserRace myUserRace = new UserRace(); myUserRace.setVrUserId(TEST_VR_USER_ID); myUserRace.setRaceId(TEST_RACE_ID); myUserRace.setMode(TEST_MODE); myUserRace.setUserService(TEST_USER_SERVICE); myUserRace.setZezoUrlTemplate(TEST_ZEZO_URL_TEMPLATE); UserRace myUserRace2 = myUserRace.clone(); myUserRace2.setRaceId(2); // action int result = userRaceDao.create(myUserRace); // assert Assert.assertEquals(1, result); }