コード例 #1
0
  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);
  }
コード例 #2
0
  @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

    }
  }
コード例 #3
0
  @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);
  }