public void SortCarsByPriceAscending()
        {
            var data = new List <Car>
            {
                new Car {
                    Model = "Car1", Price = 5000m
                },
                new Car {
                    Model = "Car2", Price = 6000m
                },
                new Car {
                    Model = "Car3", Price = 7000m
                },
            }.AsQueryable();

            var mockSet = new Mock <DbSet <Car> >();

            mockSet.As <IQueryable <Car> >().Setup(m => m.Provider).Returns(data.Provider);
            mockSet.As <IQueryable <Car> >().Setup(m => m.Expression).Returns(data.Expression);
            mockSet.As <IQueryable <Car> >().Setup(m => m.ElementType).Returns(data.ElementType);
            mockSet.As <IQueryable <Car> >().Setup(m => m.GetEnumerator()).Returns(data.GetEnumerator());

            var mockContext = new Mock <CarDealershipContext>();

            mockContext.Setup(m => m.Cars).Returns(mockSet.Object);

            var service    = new CarBusiness(mockContext.Object);
            var SortedCars = service.SortCarsByPriceAscending();

            Assert.AreEqual(5000m, SortedCars[0].Price);
            Assert.AreEqual(6000m, SortedCars[1].Price);
            Assert.AreEqual(7000m, SortedCars[2].Price);
        }
        /// <summary>
        /// Populate the data grid with information sorted by cars' price in ascending order
        /// </summary>
        private void PopulateDataGridViewSortCarsByPriceAscending()
        {
            dataGridView.Rows.Clear(); HideSpecificInfo();
            CarBusiness carBusiness = new CarBusiness();
            var         carsList    = carBusiness.SortCarsByPriceAscending();

            DataPopulator(carsList);
        }