Exemple #1
0
        public async Task WhenToRunTheCreateMethod()
        {
            _serviceMock = new Mock <ICountyService>();
            _serviceMock.Setup(m => m.Post(countyCreateDto)).ReturnsAsync(countyCreateResultDto);
            _serviceCounty = _serviceMock.Object;
            var result = await _serviceCounty.Post(countyCreateDto);

            Assert.NotNull(result);
            Assert.Equal(NameCounty, result.Name);
            Assert.Equal(CodeIbgeCounty, result.CodeIbge);
            Assert.Equal(FederalUnitId, result.FederalUnitId);
        }