public void Arrange() { _carRepo = new KomodoGreenRepo(); _car1 = new KomodoGreen(CarTypeEnum.electric, "Tesla", "It's a Tesla."); _car2 = new KomodoGreen(CarTypeEnum.electric, "Zoom", "It's a Zoom."); _car3 = new KomodoGreen(CarTypeEnum.gas, "Ford", "It's a regular Ford."); _carRepo.AddCar(_car1); _carRepo.AddCar(_car2); _sampleListToAdd.Add(_car3); _listRepo = new KomodoGreenListRepo(); _list1 = new KomodoGreenList(CarListTypeEnum.Electric); _list2 = new KomodoGreenList(CarListTypeEnum.Gas); _listRepo.CreateCarList(_list1); }
public void CarAdd() { Console.Clear(); KomodoGreen newCar = new KomodoGreen(); Console.WriteLine("Enter the number assocated with the car type to be added\n" + "1. Electric\n" + "2. Hybrid\n" + "3. Gas"); newCar.CarType = (CarTypeEnum)int.Parse(Console.ReadLine()); Console.WriteLine("Enter the name of the new car."); newCar.Name = Console.ReadLine(); Console.WriteLine("Enter any details for the new car."); newCar.Details = Console.ReadLine(); _carRepo.AddCar(newCar); }