public void CalculateNonZero_Average_Returns_Average()
 {
     var samples = new WorkoutSamples(0);
     var vector = new WorkoutSampleVector(3, WorkoutSampleDataType.Power);
     vector.AddPoint(1, 2);
     vector.AddPoint(2, 4);
     vector.AddPoint(3, 0);
     IAthlete athlete = new Athlete();
     var workoutCalculator = new WorkoutSamplesCalculator(samples,athlete);
     var average = workoutCalculator.CalculateNonZeroVectorAverage(vector);
     Assert.Equal(3, average);
 }
 public void CalculateNormalizedPower_With_Under_30_Samples_Returns_Average()
 {
     //Initialise();
     var samples = new WorkoutSamples(0);
     var vector = new WorkoutSampleVector(2, WorkoutSampleDataType.Power);
     vector.AddPoint(1, 2);
     vector.AddPoint(2, 4);
     IAthlete athlete = new Athlete();
     var workoutCalculator = new WorkoutSamplesCalculator(samples, athlete);
     var average = workoutCalculator.CalculateVectorNormalizedAverage(vector);
     Assert.Equal(3, average);
 }
 public void CalculatCadenceClassificatoion_Under_2_Samples_returns_()
 {
     var samples = new WorkoutSamples(0);
     var vector = new WorkoutSampleVector(1, WorkoutSampleDataType.Cadence);
     vector.AddPoint(1, 2);
     samples.CadenceVector = vector;
     IAthlete athlete = new Athlete();
     var workoutCalculator = new WorkoutSamplesCalculator(samples, athlete);
     var classification = workoutCalculator.ClassifyWorkoutCadenceRanges();
     Assert.IsType<List<ICadenceRange>>(classification);
 }