public async Task GetPeriodDropdownListAsync()
        {
            // Arrange
            _mockConfiguration.Setup(c => c.GetValue(It.IsAny<string>())).Returns("period-test-01");
            using (var uow = _applicationDbFactory.BeginUnitOfWorkAsync().Result)
            {
                await SeedPeriods(uow);

                // Act
                var actualResult = await _periodService.GetPeriodDropdownListAsync();

                // Assert
                Assert.IsTrue(actualResult.Count == 4, "Expected count should be 4");
                Assert.IsTrue(actualResult.Any(i => i.Discription == "2018 - April"), "Expected result should have april record");
            }
        }
Exemplo n.º 2
0
 public async Task <List <PeriodModel> > GetPeriodDropdownListAsync()
 {
     return(await _periodService.GetPeriodDropdownListAsync());
 }