Example #1
0
        private void GetListOfGas()
        {
            Console.Clear();
            List <Gas> listOfGas = gas_Repo.GetGasList();

            foreach (Gas gas in listOfGas)
            {
                Console.WriteLine($"\nMake: {gas.Make}\n" +
                                  $"Model: {gas.Model}\n" +
                                  $"Fuel Efficiency: {gas.FuelEfficiency}");
            }
        }
Example #2
0
        //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);
        }