You need to sign in to do that
Don't have an account?
shweta kumari 25
custom settings in text classes
I have countries in custom settings and corresponding states in another custom setting.
I have a working code which will fetch the countries in picklist and then based on countries selection it will populatate the states picklist
I need to write test class for the same; not sure how to go about it to cover the custom settings.(test cases)
Please let me know how we can achieve this
thanks
shweta
I have a working code which will fetch the countries in picklist and then based on countries selection it will populatate the states picklist
I need to write test class for the same; not sure how to go about it to cover the custom settings.(test cases)
Please let me know how we can achieve this
thanks
shweta
Custom settings are nothing but an object .All you need in Test Class is instantiate the custom settings object and create the records of the custom settings and insert it in Test class itself.Make sure you bulkify your insert call.
All Answers
For example
Custom settings are nothing but an object .All you need in Test Class is instantiate the custom settings object and create the records of the custom settings and insert it in Test class itself.Make sure you bulkify your insert call.
In test class, if we use custom settings and dont specify seealldate=true does it work?
shweta