Пример #1
0
        private void ShowOneDriver()
        {
            Console.Write("Please enter the ID of the driver you would like to view: ");
            int    driverID = int.Parse(Console.ReadLine());
            Driver driver   = _insuranceRepo.GetOneDriver(driverID);

            Console.WriteLine($"Driver ID: {driver.DriverID}\n" +
                              $"Name: {driver.DriverName}\n" +
                              $"Monthly Premium: ${driver.Premium}\n" +
                              $"Safety Status: {driver.DriverClass}\n" +
                              $"Safety Score: {driver.SafetyScore}\n" +
                              $"Percentage of time speeding: {driver.DriverData.SpeedingFrequency}%\n" +
                              $"Percentage of time out of lane: {driver.DriverData.OutOfLaneFrequency}%\n" +
                              $"Percentage of time following too closely: {driver.DriverData.FollowingTooCloselyFrequency}%\n" +
                              $"Number of times rolling through stop signs: {driver.DriverData.TimesRollingThroughStopSign}\n" +
                              $"----------------------------------------------------------" +
                              $"Press any key to continue...");
            Console.ReadKey();
        }
 public void GetOneDriverTest()
 {
     Assert.IsInstanceOfType(_insuranceRepo.GetOneDriver(00001), typeof(Driver));
 }