Esempio n. 1
0
        public async void GetByGenreAsync(string idGenre, int PageSize, int PageNumber)
        {
            IEnumerable <Track> track = new List <Track> ();

            _trackRepositoryMock.Setup(r => r.GetByGenreAsync(idGenre, PageSize, PageNumber)).Returns(Task.FromResult(track));
            var result = await _trackService.GetByGenreAsync(idGenre, PageSize, PageNumber);

            Assert.NotNull(result);
            _trackRepositoryMock.Verify(x => x.GetByGenreAsync(idGenre, PageSize, PageNumber), Times.Once());
        }