Newer Version Available

This content describes an older version of this product. View Latest

testCanvasLifecycle(lifecycleHandler, mockRenderContext)

Calls the canvas test framework to invoke a CanvasLifecycleHandler with the provided RenderContext.

Signature

public static Void testCanvasLifecycle(Canvas.CanvasLifecycleHandler lifecycleHandler,Canvas.RenderContext mockRenderContext)

Parameters

lifecycleHandler
Type: Canvas.CanvasLifecycleHandler
Specifies the CanvasLifecycleHandler implementation that you need to invoke.
mockRenderContext
Type: Canvas.RenderContext
Specifies the RenderContext information that you need to provide to the invoked CanvasLifecycleHandler. If null is provided for this parameter, the canvas framework generates and uses a default mock RenderContext.

Return Value

Type: Void

Usage

Use this method to invoke an implementation of Canvas.CanvasLifecycleHandler.onRender(renderContext) with a mock Canvas.RenderContext that you provide.

Example

The following example creates maps to represent mock application and environment context data and generates a test Canvas.RenderContext. This test RenderContext is then used to invoke a Canvas.CanvasLifecycleHandler.