public virtual ApiUserServerRequestModel MapServerResponseToRequest( ApiUserServerResponseModel response) { var request = new ApiUserServerRequestModel(); request.SetProperties( response.BioImgUrl, response.Birthday, response.ContentDescription, response.Email, response.FullName, response.HeaderImgUrl, response.Interest, response.LocationLocationId, response.Password, response.PhoneNumber, response.Privacy, response.Username, response.Website); return(request); }
public void MapModelToEntity() { var mapper = new DALUserMapper(); ApiUserServerRequestModel model = new ApiUserServerRequestModel(); model.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A", 1, "A", "A", "A", "A", "A"); User response = mapper.MapModelToEntity(1, model); response.BioImgUrl.Should().Be("A"); response.Birthday.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ContentDescription.Should().Be("A"); response.Email.Should().Be("A"); response.FullName.Should().Be("A"); response.HeaderImgUrl.Should().Be("A"); response.Interest.Should().Be("A"); response.LocationLocationId.Should().Be(1); response.Password.Should().Be("A"); response.PhoneNumber.Should().Be("A"); response.Privacy.Should().Be("A"); response.Username.Should().Be("A"); response.Website.Should().Be("A"); }