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→Stringglobal CARTITEM_NAME→Stringglobal CART_NAME→Stringglobal DELIVERYGROUP_NAME→Stringglobal 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 |