private void UpdateGas() { GetListOfGas(); Console.WriteLine("\nEnter the Model of the gas car to be updated"); string oldModel = Console.ReadLine(); Console.Clear(); Gas newGas = new Gas(); Console.WriteLine("Enter the Make"); newGas.Make = Console.ReadLine(); Console.WriteLine("Enter the Model"); newGas.Model = Console.ReadLine(); Console.WriteLine("Enter fuel efficiency information"); newGas.FuelEfficiency = Console.ReadLine(); bool wasUpdated = gas_Repo.UpdateExistingGas(oldModel, newGas); if (wasUpdated) { Console.WriteLine("Gas Car updated!"); } else { Console.WriteLine("Could not update Gas Car."); } }
//update public void UpdateExistingGas_ShouldReturnTrue() { //arrange Gas newGas = new Gas("GMC", "Sierra", "17 miles per gallon"); //act bool updateGas = _repo.UpdateExistingGas("Sierra", newGas); //assert Assert.IsTrue(updateGas); }