To make sure your custom form logic in GoMeddo is unit tested a global class called Test_FormHelper, is added to the applications. This class contains helper methods that allow you to trigger form events.
Because these methods fire an event as if it was fired from the form to make the behaviour consistent during unit tests and normal operation the default GoMeddo handlers are also fired. This means the return value of FormEvent could include FormEvents produced by GoMeddo.
Start of the unit test
To let GoMeddo know that there is custom logic in place you need to add a @TestSetup. Which creates the setting in the unit test.
@TestSetup
static void makeData(){
B25__System_Setting__c systemSetting = new B25__System_Setting__c();
systemSetting.Name ='Reservation Form Customizer Class';
systemSetting.B25__String_Value__c = <CUSTOMIZER_APEX_CLASS_NAME>;
Database.insert(systemSetting);
}
Methods
runFormInitializationEvent
Using this method, you can trigger a form initialization event to test your custom form implementations.