@Test public void measurement() { Measurement measurement = new Measurement(); Workout workout = new Workout(); measurement.reset();; workout.onMeasured(measurement); assertEquals(Integer.valueOf(0), workout.duration.get()); assertEquals(Integer.valueOf(0), workout.distance.get()); assertEquals(Integer.valueOf(0), workout.strokes.get()); assertEquals(Integer.valueOf(0), workout.energy.get()); measurement.setDuration(0); measurement.setDistance(1); measurement.setStrokes(1); measurement.setEnergy(1); workout.onMeasured(measurement); assertEquals(Integer.valueOf(0), workout.duration.get()); assertEquals(Integer.valueOf(1), workout.distance.get()); assertEquals(Integer.valueOf(1), workout.strokes.get()); assertEquals(Integer.valueOf(1), workout.energy.get()); measurement.setDuration(1); measurement.setDistance(2); measurement.setStrokes(2); measurement.setEnergy(2); workout.onMeasured(measurement); assertEquals(Integer.valueOf(1), workout.duration.get()); assertEquals(Integer.valueOf(2), workout.distance.get()); assertEquals(Integer.valueOf(2), workout.strokes.get()); assertEquals(Integer.valueOf(2), workout.energy.get()); measurement.setDuration(1); measurement.setDistance(3); measurement.setStrokes(3); measurement.setEnergy(3); workout.onMeasured(measurement); assertEquals(Integer.valueOf(1), workout.duration.get()); assertEquals(Integer.valueOf(3), workout.distance.get()); assertEquals(Integer.valueOf(3), workout.strokes.get()); assertEquals(Integer.valueOf(3), workout.energy.get()); measurement.setDuration(2); measurement.setDistance(4); measurement.setStrokes(4); measurement.setEnergy(4); workout.onMeasured(measurement); assertEquals(Integer.valueOf(2), workout.duration.get()); assertEquals(Integer.valueOf(4), workout.distance.get()); assertEquals(Integer.valueOf(4), workout.strokes.get()); assertEquals(Integer.valueOf(4), workout.energy.get()); }
public void onMeasured(Measurement measurement) { update(this.distance, measurement.getDistance()); update(this.duration, measurement.getDuration()); update(this.strokes, measurement.getStrokes()); update(this.energy, measurement.getEnergy()); }
Workout extends Propoid { public void onMeasured(Measurement measurement) { update(this.distance, measurement.getDistance()); update(this.duration, measurement.getDuration()); update(this.strokes, measurement.getStrokes()); update(this.energy, measurement.getEnergy()); } }
Workout extends Propoid { public void onMeasured(Measurement measurement) { update(this.distance, measurement.getDistance()); update(this.duration, measurement.getDuration()); update(this.strokes, measurement.getStrokes()); update(this.energy, measurement.getEnergy()); } Workout();  Workout(Program program); }
Workout extends Propoid { public void onMeasured(Measurement measurement) { update(this.distance, measurement.getDistance()); update(this.duration, measurement.getDuration()); update(this.strokes, measurement.getStrokes()); update(this.energy, measurement.getEnergy()); } Workout();  Workout(Program program); void onMeasured(Measurement measurement); String programName(String fallback); boolean canRepeat(); }
Workout extends Propoid { public void onMeasured(Measurement measurement) { update(this.distance, measurement.getDistance()); update(this.duration, measurement.getDuration()); update(this.strokes, measurement.getStrokes()); update(this.energy, measurement.getEnergy()); } Workout();  Workout(Program program); void onMeasured(Measurement measurement); String programName(String fallback); boolean canRepeat(); final Property<Program> program; final Property<Location> location; final Property<Long> start; final Property<Integer> duration; final Property<Integer> distance; final Property<Integer> strokes; final Property<Integer> energy; final Property<Boolean> evaluate; }