You need to sign in to do that
Don't have an account?
Bard09
Test code for components with custom controllers?
Does anyone have any tips or examples for how to write test code for components with custom controllers? I've written a few myself, but am unable to find any documentation for how to instantiate a component for test purposes.
If anyone could point me to an example (or, better yet, post some test code you've written yourself!) that would be amazing.
I'm sure this could help others as well. Google has been absolutely useless on the topic.
There is an example in the later part of this article -
http://wiki.developerforce.com/index.php/An_Introduction_to_Apex_Code_Test_Methods
I did a search for the word "component" and didn't find anything on that page. Were you referring to the section where they test a Visualforce page by instantiating it and calling its custom controller?
If so, can you explain how that'd be adapted to the scenario of a component with a custom controller, instead? I've tried doing something similar with my test code, but have not had any success so far.
Shameless bump because I'm still hampered by this problem. Can anyone assist?