Ejemplo n.º 1
0
        public void ModelCar_DeleteById_WithIdNotNull_True()
        {
            IService <ModelCar> modelCarService = new ModelCarService();
            ModelCar            newModelCar     = new ModelCar(1005, "Audi");

            modelCarService.Create(newModelCar);
            int countBefore = modelCarService.GetListAll().Count;

            modelCarService.DeleteById(1005);
            int countAfter = modelCarService.GetListAll().Count;

            Assert.IsTrue(countBefore > countAfter);
        }
Ejemplo n.º 2
0
        public void ModelCar_DeleteById_WithIdNull_Exception()
        {
            IService <ModelCar> modelCarService = new ModelCarService();

            modelCarService.DeleteById(9999);
        }