public async Task GetTopAsyncTest() { var tops = (await _hashTagRepository.GetTopAsync(3)).ToList(); Assert.AreEqual(3, tops.Count()); Assert.AreSame(hashTag2, tops[0]); Assert.AreSame(hashTag1, tops[1]); Assert.AreSame(hashTag3, tops[2]); }
public async Task <IEnumerable <HashTag> > GetTopAsync(int amount) { ServiceHelpers.CheckValidId(amount); return(await _repository.GetTopAsync(amount)); }