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);
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            _policyDetailsService = Substitute.For <IPolicyDetailsService>();
            _mapper = Substitute.For <AutoMapper.IMapper>();
            _log    = Substitute.For <Logger.IMapper>();

            _policyDetails = new PolicyDetails

            {
                IDPolicyDetails = 1,
                IDTypeFuel      = 4
            };


            _policyDetailsService.AllPolicys()
            .Returns(Task.FromResult((IEnumerable <PolicyDetails>) new List <PolicyDetails>()
            {
                _policyDetails
            })
                     );

            _policyDetailsService.FindById(Arg.Is <int>(x => x == 1))
            .Returns(_policyDetails);
        }