Exemple #1
0
        public async Task GetBriefListAsync_WhenCalled_GetSeasonsFromDb()
        {
            var expectedSeasons = new List <Season>()
            {
                new Season {
                    Id = 1
                },
                new Season {
                    Id = 2
                },
                new Season {
                    Id = 3
                },
            };

            _seasonRepository.Setup(s => s.GetBriefListAsync()).ReturnsAsync(expectedSeasons);

            var result = await _seasonService.GetBriefListAsync();

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