You need to sign in to do that
Don't have an account?
Madhulendra
Need Help to wirte Test Class For Update Record
hi , I have written a method updateRecord for Controller Class. the funcionality of this
method is to update record. but how I can write a Test Class for this method. can
anybody help me.
public PageReference updateRecord()
{
ApexPages.Message myMsg=null;try
{
for(CustomerFinancialDetail__c cfd : updateInsuredParty){
Database.SaveResult[] sr = Database.update(updateInsuredParty);for(Database.SaveResult sr1 : sr)
if(sr1.isSuccess()){
myMsg = new ApexPages.Message(ApexPages.severity.CONFIRM,'Record Saved Sucessfully','');ApexPages.addMessage(myMsg);
}
}
}
catch(Exception e)
{
system.debug('Exception Caught --->'+e.getMessage());
}
}
}
Thanks in advance
This will get you started-
APEX Code Coverage Methods
Cool_D