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.

ConstantDescription
KEY_CANVAS_URLRepresents the canvas app URL key in the ApplicationContext.
KEY_DEVELOPER_NAMERepresents the canvas app developer or API name key in the ApplicationContext.
KEY_DISPLAY_LOCATIONRepresents the canvas app display location key in the EnvironmentContext.
KEY_LOCATION_URLRepresents the canvas app location URL key in the EnvironmentContext.
KEY_NAMERepresents the canvas app name key in the ApplicationContext.
KEY_NAMESPACERepresents the canvas app namespace key in the ApplicationContext.
KEY_SUB_LOCATIONRepresents the canvas app sublocation key in the EnvironmentContext.
KEY_VERSIONRepresents the canvas app version key in the ApplicationContext.