Exemplo n.º 1
0
        public void Can_Create()
        {
            var city = new CityDomainModel()
            {
                Name = "London"
            };

            _sutDomainService.CreateCity(city);

            _mockMapperService.Verify(x => x.Map <CityDto>(city), Times.Once());
            _mockDataService.Verify(x => x.CreateCity(It.IsAny <CityDto>()));
        }
Exemplo n.º 2
0
 public void Post([FromBody] CityApiModel city)
 {
     _cityDomainService.CreateCity(_mapperService.Map <CityDomainModel>(city));
 }