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); }
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))); }