public void CalculateNonZero_Average_With_No_Data_Returns_Zero()
 {
     var samples = new WorkoutSamples(0);
     var vector = new WorkoutSampleVector(3, WorkoutSampleDataType.Power);
     IAthlete athlete = new Athlete();
     var workoutCalculator = new WorkoutSamplesCalculator(samples, athlete);
     var average = workoutCalculator.CalculateNonZeroVectorAverage(vector);
     Assert.Equal(0, average);
 }
        public void CalculateNonZero_Average_With_No_Data_Returns_Zero()
        {
            var      samples           = new WorkoutSamples(0);
            var      vector            = new WorkoutSampleVector(3, WorkoutSampleDataType.Power);
            IAthlete athlete           = new Athlete();
            var      workoutCalculator = new WorkoutSamplesCalculator(samples, athlete);
            var      average           = workoutCalculator.CalculateNonZeroVectorAverage(vector);

            Assert.Equal(0, average);
        }
 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 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);
        }