Esempio n. 1
0
  public void testGetWholeSingleWorkout() {
    final int TESTS_NUMBER_ITEMS = 20;
    insertWorkouts(TESTS_NUMBER_ITEMS);

    List<Workout> workouts = db.getAllWorkoutNames();

    for (Workout workout : workouts) {
      Workout w = db.getWholeSingleWorkout(workout.getID());
      int creationI = w.getRepeatCount(); // repeat count points the
      // creation i number
      checkSimpleWorkout(w, creationI);
      checkActions(w.getActions(), creationI);
    }
  }
Esempio n. 2
0
 private void checkSimpleWorkout(Workout w, int i) {
   assertEquals("Workout " + i, w.getName());
   assertEquals(i, w.getRepeatCount());
   assertEquals(i % 2 == 0, w.isWarmUp());
 }