Example #1
0
        public async Task Bonus_DeactivateBonusAsync_Return_BonusDTO()
        {
            CreateDefaultBonusServiceInstance();
            var idBonus = _fakeBonuseDtos[0].Id;

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

            Assert.False(bonus.IsActive);
        }
Example #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> > > DeactivateBonusAsync([FromRoute] Guid id)
 {
     return(Ok(await _BonusService.DeactivateBonusAsync(id)));
 }