private void CreateNewGas() { 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(); gas_Repo.AddGasToList(newGas); }
//create public void AddGasToList_ShouldGetCorrectBoolean() { //Arrange Gas gas = new Gas(); Gas_Repo repo = new Gas_Repo(); //Act bool addResult = repo.AddGasToList(gas); //Assert Assert.IsTrue(addResult); }
//read public void GetGasList_ShouldReturnCorrectCollection() { //arrange Gas gas = new Gas(); Gas_Repo repo = new Gas_Repo(); repo.AddGasToList(gas); //act List <Gas> gasList = repo.GetGasList(); bool dirHasGas = gasList.Contains(gas); //assert Assert.IsTrue(dirHasGas); }
public void Arrange() { _repo = new Gas_Repo(); _gas = new Gas("GMC", "Sierra", "17 miles per gallon"); _repo.AddGasToList(_gas); }