You need to sign in to do that
Don't have an account?
saimadhu
who to write test case for a method which takes parameters
Hi,
Iam trying to develop a testcase for controller.
here is my controller.
public with sharing class Handler_Account_CreateSA {
private boolean m_isExecuting = false;
private integer BatchSize = 0;
public Handler_Account(boolean Exe, integer size) {
Exe = isExecuting;
BatchSize = size;
}
public void OnAfterInsert(Account[] accounts) {
--
--
}
how can i write a test case for this.
any suggestions please
Check out the VF Documentation, section entitled '"Testing Custom Controllers and Controller Extensions"
It shows how you create a testmethod and set parameters
It's pretty simple...
Let's say I have a cunstructor like this:
public Handler_Account() so in test class we just write Handler_Account controller = new Handler_Account() ;
now if we have public Handler_Account(boolean Exe, integer size)
then just write this in test class:
Thanks
Ankit Arora
Blog | Facebook | Blog Page