You need to sign in to do that
Don't have an account?
Thedude
New Developer looking for help in test cases.
I need to create a test case for this code:
global class LeadConvertResult
{
global ID ProspectId {get;set;}
global boolean Success {get;set;}
global Integer Strength {get;set;}
global LeadConvertResult()
{
Success = false;
Strength = 0;
}
How would I go about doing this?
Hi,
Purpose of writing test Method for apex is to insure the execution of your code is expected or not.
For your class test method would be as given below -
static testMethod void mySampleTest()
{
LeadConvertResult l=new LeadConvertResult();
}
Since you didnt write any method in your class so just create instance of that class so constructor will execute automatically.
Yeah, and make sure you reference the properties. Success and strength are tested in the constructor, but you also need to reference ProspectId.