public virtual ApiProductModelResponseModel MapBOToModel( BOProductModel boProductModel) { var model = new ApiProductModelResponseModel(); model.SetProperties(boProductModel.ProductModelID, boProductModel.CatalogDescription, boProductModel.Instruction, boProductModel.ModifiedDate, boProductModel.Name, boProductModel.Rowguid); return(model); }
public void MapResponseToRequest() { var mapper = new ApiProductModelModelMapper(); var model = new ApiProductModelResponseModel(); model.SetProperties(1, "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); ApiProductModelRequestModel response = mapper.MapResponseToRequest(model); response.CatalogDescription.Should().Be("A"); response.Instruction.Should().Be("A"); 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")); }