コード例 #1
0
        public void RemoveGreenCarFromListTest()
        {
            SetContentOneGreenCar();

            _testGreenCarsRepo.RemoveGreenCarFromList(greenCar1.Id);

            GreenCars testIfNullCar = _testGreenCarsRepo.GetGreenCarById(greenCar1.Id);

            Assert.IsNull(testIfNullCar);
        }
コード例 #2
0
        private void RemoveGreenCarById()
        {
            Clear();
            WriteLine("\nEnter the Green Car Id to Remove.");
            int  carIdRemove  = Int32.Parse(ReadLine());
            bool ifCarRemoved = _greenCarsRepo.RemoveGreenCarFromList(carIdRemove);

            if (ifCarRemoved == true)
            {
                WriteLine("\nCar Was Removed!");
            }
            else
            {
                WriteLine("\nCar Was NOT Removed!");
            }
        }