|
91 | 91 | import com.shopify.model.ShopifyProductUpdateRequest; |
92 | 92 | import com.shopify.model.ShopifyProducts; |
93 | 93 | import com.shopify.model.ShopifyProductsRoot; |
| 94 | +import com.shopify.model.ShopifyProperty; |
94 | 95 | import com.shopify.model.ShopifyRecurringApplicationCharge; |
95 | 96 | import com.shopify.model.ShopifyRecurringApplicationChargeCreationRequest; |
96 | 97 | import com.shopify.model.ShopifyRecurringApplicationChargeRoot; |
@@ -395,6 +396,12 @@ public void givenSomePageAndCreatedAtMinAndCreatedAtMaxOrdersWhenRetrievingOrder |
395 | 396 | "Some Tax Line2"); |
396 | 397 | shopifyLineItem1 |
397 | 398 | .setTaxLines(new LinkedList<>(Arrays.asList(shopifyTaxLine1LineItem1, shopifyTaxLine1LineItem2))); |
| 399 | + |
| 400 | + final ShopifyProperty shopifyProperty1 = buildShopifyProperty("message", "Some new message"); |
| 401 | + final ShopifyProperty shopifyProperty2 = buildShopifyProperty("from", "From family"); |
| 402 | + final ShopifyProperty shopifyProperty3 = buildShopifyProperty("to", "To family member"); |
| 403 | + shopifyLineItem1 |
| 404 | + .setProperties(new LinkedList<>(Arrays.asList(shopifyProperty1, shopifyProperty2, shopifyProperty3))); |
398 | 405 | shopifyOrder1.setLineItems(Arrays.asList(shopifyLineItem1)); |
399 | 406 |
|
400 | 407 | final ShopifyFulfillment shopifyFulfillment = new ShopifyFulfillment(); |
@@ -498,6 +505,19 @@ public void givenSomePageAndCreatedAtMinAndCreatedAtMaxOrdersWhenRetrievingOrder |
498 | 505 | shopifyOrders.get(0).getLineItems().get(0).getTaxLines().get(1).getPrice()); |
499 | 506 | assertEquals(shopifyTaxLine1LineItem2.getTitle(), |
500 | 507 | shopifyOrders.get(0).getLineItems().get(0).getTaxLines().get(1).getTitle()); |
| 508 | + assertEquals(shopifyProperty1.getName(), |
| 509 | + shopifyOrders.get(0).getLineItems().get(0).getProperties().get(0).getName()); |
| 510 | + assertEquals(shopifyProperty1.getValue(), |
| 511 | + shopifyOrders.get(0).getLineItems().get(0).getProperties().get(0).getValue()); |
| 512 | + assertEquals(shopifyProperty2.getName(), |
| 513 | + shopifyOrders.get(0).getLineItems().get(0).getProperties().get(1).getName()); |
| 514 | + assertEquals(shopifyProperty2.getValue(), |
| 515 | + shopifyOrders.get(0).getLineItems().get(0).getProperties().get(1).getValue()); |
| 516 | + assertEquals(shopifyProperty3.getName(), |
| 517 | + shopifyOrders.get(0).getLineItems().get(0).getProperties().get(2).getName()); |
| 518 | + assertEquals(shopifyProperty3.getValue(), |
| 519 | + shopifyOrders.get(0).getLineItems().get(0).getProperties().get(2).getValue()); |
| 520 | + |
501 | 521 | assertEquals(shopifyOrder1.getFulfillments().get(0).getId(), |
502 | 522 | shopifyOrders.get(0).getFulfillments().get(0).getId()); |
503 | 523 | assertTrue(shopifyOrder1.getFulfillments().get(0).getCreatedAt() |
@@ -3700,4 +3720,11 @@ private ShopifyTaxLine buildTaxLine(final BigDecimal price, final BigDecimal rat |
3700 | 3720 | shopifyTaxLine1LineItem1.setTitle(title); |
3701 | 3721 | return shopifyTaxLine1LineItem1; |
3702 | 3722 | } |
| 3723 | + |
| 3724 | + private ShopifyProperty buildShopifyProperty(final String name, final String value) { |
| 3725 | + final ShopifyProperty shopifyProperty = new ShopifyProperty(); |
| 3726 | + shopifyProperty.setName(name); |
| 3727 | + shopifyProperty.setValue(value); |
| 3728 | + return shopifyProperty; |
| 3729 | + } |
3703 | 3730 | } |
0 commit comments