You need to sign in to do that
Don't have an account?
PrasadVR
how to get soql query only test class data
Hi All ,
I have test class where I am providing all the required data when I run the test class , my soql query in class is fetching the data from database instead of test class
How to avoid this ? and how to get my quey only test class data
I have test class where I am providing all the required data when I run the test class , my soql query in class is fetching the data from database instead of test class
How to avoid this ? and how to get my quey only test class data
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_isTest.htm
Use @isTest(seeAllData = False)
the above code will restric your query to fetch records from data base,
for test class you can refer this post
http://abhithetechknight.blogspot.in/2013/10/salesforce-test-class-basics.html