6 个回答
Hi Rahul,After inserting, we need to query the same record then check values.
ThanksVaraprasad@istest
public class Industryisbankingtest
{
static testmethod void test5(){
account ac = new account(name='Robin Ltd',Industry='Banking',Ownership='Private');
test.startTest();
insert ac ;
test.stoptest();
account act = [select id,name,Ownership from account where id =: ac.id];
system.debug('==act=='+act);
system.debug('==ac.ownershp=='+act.Ownership);
system.assertEquals('Public' , act.ownership);
}
}