+ Start a Discussion
udayarangareddy mekalaudayarangareddy mekala 


how to pass the test data for the IF conditions
            }catch(NullPointerException E){
           system.debug('***before executing doSearch***');
For  above block please guide me how to pass the data depend on If condition.

Himanshu ParasharHimanshu Parashar
what is val ?
udayarangareddy mekalaudayarangareddy mekala
val is a variable
udayarangareddy mekalaudayarangareddy mekala
sr is also variable
Himanshu ParasharHimanshu Parashar
it would be great if you can post your apex class with your test class it will give better visibility what is the best answer in your case. because we don't know what variable you have used inside test class to set variable property in your apex class.
As you are using val.contains, i assume val is either set or string and if you are checking for null and not for null as string , please dont put 'null' in single qotes

As Himanshu mentioned it will be good if you can post complite class so it will be easy to solve the problem