public ActionResult DeleteParkingPlace(int id)
        {
            var parkingPlace = _parkingPlaceService.FindById(id);

            if (parkingPlace == null)
            {
                return(NotFound());
            }
            _parkingPlaceService.DeleteParkingPlace(parkingPlace);
            _parkingPlaceService.SaveChanges();
            _log.Save(User.Identity.Name, "Usunięto rodzaj miejsca parkingowego ", GetType().Name);
            return(Ok());
        }
        public void Initialize()
        {
            _parkingPlaceService = Substitute.For <IParkingPlaceService>();
            _mapper = Substitute.For <AutoMapper.IMapper>();
            _log    = Substitute.For <Logger.IMapper>();

            _parkingPlace = new ParkingPlace
            {
                IDParkingPlace = 1,
                Place          = "dom"
            };
            _parkingPlaceService.AllParkingPlace()
            .Returns(Task.FromResult((IEnumerable <ParkingPlace>) new List <ParkingPlace>()
            {
                _parkingPlace
            })
                     );

            _parkingPlaceService.FindById(Arg.Is <int>(x => x == 1))
            .Returns(_parkingPlace);
        }