示例#1
0
        public virtual ApiAddressTypeResponseModel MapBOToModel(
            BOAddressType boAddressType)
        {
            var model = new ApiAddressTypeResponseModel();

            model.SetProperties(boAddressType.AddressTypeID, boAddressType.ModifiedDate, boAddressType.Name, boAddressType.Rowguid);

            return(model);
        }
示例#2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiAddressTypeModelMapper();
            var model  = new ApiAddressTypeResponseModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiAddressTypeRequestModel response = mapper.MapResponseToRequest(model);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }