CartExtension.CartTestUtil
ISTEST
A utility class that can be only used when writing Apex tests. It allows you to get a CartExtension.Cart Apex object, similar to the one that would be sent by the extensibility framework.
global ACCOUNT_NAME
→String
global CARTITEM_NAME
→String
global CART_NAME
→String
global DELIVERYGROUP_NAME
→String
global WEBSTORE_NAME
→String
Allows you to retrieve a CartExtension.Cart Apex object from a WebCart record ID.
Param | Description |
---|---|
cartRecordId | ID of the WebCart record to load as a CartExtension.Cart Apex object. |
Type | Description |
---|---|
Cart | CartExtension.Cart |
Creates the necessary Account, WebStore (type B2B), WebCart, CartDeliveryGroup, and CartItem records and returns the corresponding CartExtension.Cart Apex object.
Type | Description |
---|---|
Cart | CartExtension.Cart |
Creates the necessary Account, WebStore, WebCart, CartDeliveryGroup, and CartItem records and returns the corresponding CartExtension.Cart Apex object.
Param | Description |
---|---|
webStoreType | type of the WebStore the cart will be created for |
Type | Description |
---|---|
Cart | CartExtension.Cart |