You need to sign in to do that
Don't have an account?
udayarangareddy mekala
Trigger Test Class1
HI
How to cover the soql query in the testclass.There is a SOQL query ,FOReach loop after that every record add to the map variable
map<string,string> vals = new map<string,string>();
list<Account> list =[SELECT Name,Id FROM Account];
for(contact ct : list){
vals.put(u.Id,u.Name);
}
The above one is the trigger code.please give me the solution how to cover that code in test classe.
Thanks&Regards
Rangareddy
How to cover the soql query in the testclass.There is a SOQL query ,FOReach loop after that every record add to the map variable
map<string,string> vals = new map<string,string>();
list<Account> list =[SELECT Name,Id FROM Account];
for(contact ct : list){
vals.put(u.Id,u.Name);
}
The above one is the trigger code.please give me the solution how to cover that code in test classe.
Thanks&Regards
Rangareddy
In your test method just insert account keep in mind all mandate fields you need to give .
Please check belwo link it will help you to built few concepts of test class .
http://manojjena20.blogspot.in/2015/06/tips-and-tricks-for-test-class.html
Let me know if it helps !!
Thanks
Manoj
All Answers
In your test method just insert account keep in mind all mandate fields you need to give .
Please check belwo link it will help you to built few concepts of test class .
http://manojjena20.blogspot.in/2015/06/tips-and-tricks-for-test-class.html
Let me know if it helps !!
Thanks
Manoj
if(newvals.severity != oldvals.Serverity){
Account acc = new Account();
acc.Field__c = 'Severity';
acc.New_Value__c= newvals.Severity;
acc.Old_Value__c= oldvals.Severity;
acc.Id__c = newvals.id;
ac.add(acc);
For above code how to write the test class.
Thnks&Regards
ranga