示例#1
0
        public async Task WhenToRunTheUpdateMethod()
        {
            _serviceMock = new Mock <ICountyService>();
            _serviceMock.Setup(m => m.Put(countyUpdateDto)).ReturnsAsync(countyUpdateResultDto);
            _serviceCounty = _serviceMock.Object;
            var resultUpdate = await _serviceCounty.Put(countyUpdateDto);

            Assert.NotNull(resultUpdate);
            Assert.Equal(NameUpdate, resultUpdate.Name);
            Assert.Equal(CodeIbgeUpdate, resultUpdate.CodeIbge);
            Assert.Equal(FederalUnitId, resultUpdate.FederalUnitId);
        }