Exemple #1
0
        public void DeleteRegionByIdAsync_ReturnsCorrect()
        {
            // Arrange
            _repoWrapper
            .Setup(x => x.Region.GetFirstAsync(It.IsAny <Expression <Func <Region, bool> > >(),
                                               It.IsAny <Func <IQueryable <Region>, IIncludableQueryable <Region, object> > >()))
            .ReturnsAsync(new Region());
            _repoWrapper
            .Setup(x => x.Region.Delete(new Region()));
            _repoWrapper
            .Setup(x => x.SaveAsync());
            // Act
            var result = _regionService.DeleteRegionByIdAsync(It.IsAny <int>());

            // Assert
            _repoWrapper.Verify();
            Assert.NotNull(result);
        }