public virtual ApiProductSubcategoryResponseModel MapBOToModel( BOProductSubcategory boProductSubcategory) { var model = new ApiProductSubcategoryResponseModel(); model.SetProperties(boProductSubcategory.ProductSubcategoryID, boProductSubcategory.ModifiedDate, boProductSubcategory.Name, boProductSubcategory.ProductCategoryID, boProductSubcategory.Rowguid); return(model); }
public void MapResponseToRequest() { var mapper = new ApiProductSubcategoryModelMapper(); var model = new ApiProductSubcategoryResponseModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); ApiProductSubcategoryRequestModel response = mapper.MapResponseToRequest(model); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); response.ProductCategoryID.Should().Be(1); response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); }