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_NAMEString
  • global CARTITEM_NAMEString
  • global CART_NAMEString
  • global DELIVERYGROUP_NAMEString
  • global WEBSTORE_NAMEString

Allows you to retrieve a CartExtension.Cart Apex object from a WebCart record ID.

ParamDescription
cartRecordIdID of the WebCart record to load as a CartExtension.Cart Apex object.
TypeDescription
CartCartExtension.Cart

Creates the necessary Account, WebStore (type B2B), WebCart, CartDeliveryGroup, and CartItem records and returns the corresponding CartExtension.Cart Apex object.

TypeDescription
CartCartExtension.Cart

Creates the necessary Account, WebStore, WebCart, CartDeliveryGroup, and CartItem records and returns the corresponding CartExtension.Cart Apex object.

ParamDescription
webStoreTypetype of the WebStore the cart will be created for
TypeDescription
CartCartExtension.Cart