Esempio n. 1
0
        public async Task GetByIdAsync_WhenCalled_GetSeasonFromDb()
        {
            const int id             = 1;
            var       expectedSeason = new Season
            {
                Id = id
            };

            _seasonRepository.Setup(s => s.GetAsync(id)).ReturnsAsync(expectedSeason);

            var result = await _seasonService.GetByIdAsync(id);

            Assert.That(result, Is.Not.Null);
            Assert.That(result, Is.EqualTo(expectedSeason));
        }