Ejemplo n.º 1
0
        public async Task GetAllRegionsAsync_ReturnsIEnumerableRegionDTO()
        {
            // Arrange
            _repoWrapper
            .Setup(x => x.Region.GetAllAsync(It.IsAny <Expression <Func <Region, bool> > >(),
                                             It.IsAny <Func <IQueryable <Region>, IIncludableQueryable <Region, object> > >()))
            .ReturnsAsync(new List <Region>());
            _mapper.Setup(x => x.Map <IEnumerable <Region>, IEnumerable <RegionDTO> >(It.IsAny <IEnumerable <Region> >()))
            .Returns(regions);
            // Act
            var result = await _regionService.GetAllRegionsAsync();

            // Assert
            Assert.IsInstanceOf <IEnumerable <RegionDTO> >(result);
            Assert.IsNotNull(result);
        }