Beispiel #1
0
        public void Initialize()
        {
            _enginePowerService = Substitute.For <IEnginePowerService>();
            _mapper             = Substitute.For <IMapper>();
            _log = Substitute.For <ILogService>();

            _enginePower = new EnginePower
            {
                IDEnginePower = 1,
                Power         = 10
            };

            _enginePowerService.AllEnginePower()
            .Returns(Task.FromResult((IEnumerable <EnginePower>) new List <EnginePower>()
            {
                _enginePower
            })
                     );

            _enginePowerService.FindById(Arg.Is <int>(x => x == 1))
            .Returns(_enginePower);
        }
        public async Task <IEnumerable <EnginePower> > AllEnginePower()
        {
            var enginepower = await _enginePowerService.AllEnginePower();

            return(enginepower);
        }