public virtual ApiProductCategoryResponseModel MapBOToModel( BOProductCategory boProductCategory) { var model = new ApiProductCategoryResponseModel(); model.SetProperties(boProductCategory.ProductCategoryID, boProductCategory.ModifiedDate, boProductCategory.Name, boProductCategory.Rowguid); return(model); }
public void MapResponseToRequest() { var mapper = new ApiProductCategoryModelMapper(); var model = new ApiProductCategoryResponseModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); ApiProductCategoryRequestModel 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")); }