You need to sign in to do that
Don't have an account?
AlanLam
Very Easy Question - For all that know :)
Dear all,
I am in the process of trying to write a test method for a VF controller. From what I have understood, I have to incorporate the test code in the actual controller. When I try I keep getting bracket errors etc.
Can anyone send me an example of how the code of controller with a test looks?
Many thanks
Alan
You don't have to keep the test code within the controller. I must admit I tend to do that so that I can get at private properties, but there's no reason why you can't have a separate test class.
If you keep the test code with the controller code you want something like the following:
Thanks for the prompt reply Bob.
Will give it a go.
PS. Always impressed with your ability to reply to so many posts haha!!