public void calculate_score_with_success() { var advertisement = data.GetAdversisementById(2); var oldScore = advertisement.Score; advertisementService.CalculateScore(advertisement.Id); advertisement.Score.Should().NotBe(0); oldScore.Should().NotBe(advertisement.Score); }
public async Task <Unit> Handle(AdvertisementCommand advertisement, CancellationToken cancellationToken) { await advertisementService.CalculateScore(advertisement.Id); return(Unit.Value); }