示例#1
0
        public async Task Bonus_ActivateBonusAsync_Return_BonusDTO()
        {
            CreateDefaultBonusServiceInstance();
            var idBonus = _fakeBonuseDtos[0].Id;

            var bonus = await _bonusService.ActivateBonusAsync(idBonus, default(CancellationToken));

            Assert.True(bonus.IsActive);
        }
示例#2
0
 public async Task <ActionResult <ResultDto <BonusDto> > > ActivateBonusAsync([FromRoute] Guid id, bool isActive)
 {
     if (isActive)
     {
         return(Ok(await _BonusService.ActivateBonusAsync(id)));
     }
     else
     {
         return(Ok(await _BonusService.DeactivateBonusAsync(id)));
     }
 }
 public async Task <ActionResult <ResultDto <BonusDto> > > ActivateBonusAsync([FromRoute] Guid id)
 {
     return(Ok(await _BonusService.ActivateBonusAsync(id)));
 }