Test WaveTemplateConfigurationModifier
Test the WaveTemplateConfigurationModifier before deploying a template that uses it.
Before you can deploy your template or package it for the Salesforce AppExchange that uses a WaveTemplateConfigurationModifier class, a unit test class must be present and all of the tests must complete successfully. The unit test is designed to call and run the modifier methods and nothing more. Use the following examples when creating your own unit test class.
Use the wavetemplate.Test helper methods for testing.
-
wavetemplate.Test.getWaveTemplateInfoForApexTesting. Retrieves the runtime template information object for testing. RequirestemplateName: -
wavetemplate.Test.getDefaultAnswersForApexTesting. Retrieves the variable answers set by user selections and/or the configuration modifier methods. RequirestemplateName:
The following code examples show how to test the methods from the Apex Examples page.
Generic Test Class Example
beforeAppCreate Test Method Example
beforeAppUpdate Test Method Example
onConfigurationRetrieval Test Method Example
For complete information, see Testing Apex.