CartTestUtil

ISTEST

A utility class that can be only used when writing Apex tests. It allows you to get a Cart Apex object, similar to the one that would be sent by the extensibility framework.

  • ACCOUNT_NAMEString
  • CARTITEM_NAMEString
  • CART_NAMEString
  • DELIVERYGROUP_NAMEString
  • WEBSTORE_NAMEString

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

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

Type

Cart

Description

Cart

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

Type

Cart

Description

Cart