You need to sign in to do that
Don't have an account?
sirishanekkanti06
need a help for writing test method for this bellow test class
public class sendemailctrl
{
public Email__c e=new Email__c();
public Email__c gete()
{
return e;
}
public void send()
{
database.saveresult sr=new database.insert(e,false);
if(sr.issucess())
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.Confirm,'Email has been sent');
ApexPages.addMessage(myMsg);
}
else
{
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.error,'Please check the details');
ApexPages.addMessage(myMsg);
system.assertequals(sr.myMsg,sr.act valu);
}
public void cancel()
{
e=new Email__c;
}
}
}
Hi,
Your class has syntax error, There is no proper closing of brace.
Regards,
Manjunath