Beispiel #1
0
        private void ShowAverage()
        {
            List <DriverData> driverData    = _insuranceRepo.GetDriverData();
            DriverData        average       = _insuranceRepo.GetAverageData(driverData);
            Driver            averageDriver = new Driver(999999, "average", average);

            Console.WriteLine($"On average our drivers are {averageDriver.DriverClass}.\n" +
                              $"Average percentage of time speeding: {average.SpeedingFrequency}%\n" +
                              $"Average percentage of time spent out of lane: {average.OutOfLaneFrequency}%\n" +
                              $"Average percentage of time spent following too closely: {average.FollowingTooCloselyFrequency}%\n" +
                              $"Average number of times rolling through stop signs: {average.TimesRollingThroughStopSign}\n" +
                              $"Press any key to continue...");
            Console.ReadKey();
        }
 public void GetDriverDataTest()
 {
     Assert.IsInstanceOfType(_insuranceRepo.GetDriverData(), typeof(List <DriverData>));
 }