public void GetGasList_ShouldWork() { GasRepo testRepo = new GasRepo(); List <GasClass> _listOfGased = testRepo.GetGasList(); Console.WriteLine(_listOfGased); }
public void AddGasToList_ShouldWork() { GasRepo testRepo = new GasRepo(); GasClass newGas = new GasClass { Make = "Mitsubishi", Model = "Lancer", Year = 4, Price = 2, Miles = 1 }; List <GasClass> _listOfGased = new List <GasClass>(); // Act _listOfGased.Add(newGas); // Assert Assert.IsTrue(_listOfGased.Count > 0); }
public void RemoveGasFromList_ShouldWork() { GasRepo testRepo = new GasRepo(); GasClass newGas = new GasClass { Make = "Mitsubishi", Model = "Lancer", Year = 4, Price = 2, Miles = 1 }; List <GasClass> _listOfGased = new List <GasClass>(); _listOfGased.Add(newGas); int initialGas = _listOfGased.Count; _listOfGased.Remove(newGas); if (initialGas > _listOfGased.Count) { Console.WriteLine("true"); } else { Console.WriteLine("false"); } }