Пример #1
0
        public virtual ApiRowVersionCheckResponseModel MapBOToModel(
            BORowVersionCheck boRowVersionCheck)
        {
            var model = new ApiRowVersionCheckResponseModel();

            model.SetProperties(boRowVersionCheck.Id, boRowVersionCheck.Name, boRowVersionCheck.RowVersion);

            return(model);
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiRowVersionCheckModelMapper();
            var model  = new ApiRowVersionCheckResponseModel();

            model.SetProperties(1, "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiRowVersionCheckRequestModel response = mapper.MapResponseToRequest(model);

            response.Name.Should().Be("A");
            response.RowVersion.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }