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_NAME → String
  • CARTITEM_NAME → String
  • CART_NAME → String
  • DELIVERYGROUP_NAME → String
  • WEBSTORE_NAME → String

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