Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Test Constants
The Test class provides constants that are used as keys when you set
mock application and environment context data.
When you call Canvas.Test.mockRenderContext(applicationContextTestValues,
environmentContextTestValues), you need to provide maps of key-value pairs to
represent your mock application and environment context data. The Test class provides static
constant strings that you can use as keys for various parts of the application and environment context.
| Constant | Description |
|---|---|
| KEY_CANVAS_URL | Represents the canvas app URL key in the ApplicationContext. |
| KEY_DEVELOPER_NAME | Represents the canvas app developer or API name key in the ApplicationContext. |
| KEY_DISPLAY_LOCATION | Represents the canvas app display location key in the EnvironmentContext. |
| KEY_LOCATION_URL | Represents the canvas app location URL key in the EnvironmentContext. |
| KEY_NAME | Represents the canvas app name key in the ApplicationContext. |
| KEY_NAMESPACE | Represents the canvas app namespace key in the ApplicationContext. |
| KEY_SUB_LOCATION | Represents the canvas app sublocation key in the EnvironmentContext. |
| KEY_VERSION | Represents the canvas app version key in the ApplicationContext. |