Exemple #1
0
        public void AddRegionAsync_ReturnsCorrect()
        {
            // Arrange
            _mapper
            .Setup(x => x.Map <RegionDTO, Region>(It.IsAny <RegionDTO>())).Returns(fakeRegion);
            _repoWrapper
            .Setup(x => x.Region.CreateAsync(fakeRegion));
            _repoWrapper
            .Setup(x => x.SaveAsync());
            // Act
            var result = _regionService.AddRegionAsync(fakeRegionDTO);

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