//cbGet and cbSort//

        //Buttons + attached logic//
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Town town = new Town
            {
                Name = txtName.Text
            };

            TownBusiness townBusiness = new TownBusiness();

            townBusiness.Add(town);
            PopulateDataGridViewDefault();
            txtName.Text = "";
        }
        public void AddTown()
        {
            var mockSet = new Mock <DbSet <Town> >();

            var mockContext = new Mock <CarDealershipContext>();

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

            var service = new TownBusiness(mockContext.Object);

            service.Add(new Town());

            mockSet.Verify(m => m.Add(It.IsAny <Town>()), Times.Once());
            mockContext.Verify(m => m.SaveChanges(), Times.Once());
        }