Cleanup: SensorDataCyclingDistanceSpeed.Data is a record.

This commit is contained in:
Dennis Guse
2023-11-15 07:20:03 +01:00
parent 58d79380cf
commit d47fa27e02
4 changed files with 7 additions and 44 deletions
@@ -562,13 +562,9 @@ public class ExportImportTest {
sensorDataSet.cyclingCadence = cyclingCadence;
if (distance != null && speed != null) {
SensorDataCyclingDistanceSpeed.Data distanceSpeedData = Mockito.mock(SensorDataCyclingDistanceSpeed.Data.class);
Mockito.when(distanceSpeedData.getDistanceOverall()).thenReturn(distance);
Mockito.when(distanceSpeedData.getSpeed()).thenReturn(Speed.of(speed));
SensorDataCyclingDistanceSpeed distanceSpeed = Mockito.mock(SensorDataCyclingDistanceSpeed.class);
Mockito.when(distanceSpeed.hasValue()).thenReturn(true);
Mockito.when(distanceSpeed.getValue()).thenReturn(distanceSpeedData);
Mockito.when(distanceSpeed.getValue()).thenReturn(new SensorDataCyclingDistanceSpeed.Data(null, distance, Speed.of(speed)));
sensorDataSet.cyclingDistanceSpeed = distanceSpeed;
}