You need to sign in to do that
Don't have an account?
IT Admin Deloitte
ApexPages.Message in Test Class
Hi All,
I've got this code in a class:
I would like to cover this lines in my test class.
Any idea on how to do it?
Thankyou!
I've got this code in a class:
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.INFO, 'Salvataggio Effettuato'); ApexPages.addMessage(myMsg); return null;
I would like to cover this lines in my test class.
Any idea on how to do it?
Thankyou!
daniel_h
You can retrieve page messages in your test class. So after doing whatever you expect would cause the message to be added, you can check for it. This code is from https://developer.salesforce.com/forums/?id=906F00000008yOqIAI.