You need to sign in to do that
Don't have an account?
MikeGill
Test Controller Extension
Completely stuck on how to test this. All the posts I have read are very confusing
public class PreloadVacancy { public PreloadVacancy(ApexPages.StandardController vacancy){ Vacancy__c plVacancy = (Vacancy__c) vacancy.getRecord(); plVacancy.Account__c = ApexPages.currentPage().getParameters().get('acc'); plVacancy.Order__c = ApexPages.currentPage().getParameters().get('ord'); plVacancy.Credit__c = ApexPages.currentPage().getParameters().get('cred'); plVacancy.Contract__c = ApexPages.currentPage().getParameters().get('con'); } }
I understand how testing works from a trigger perspective. But have no idea on controllers. Interestingly enough this is deployed in production with 0% converage.
Any pointers welcome.
Check out the documentation at http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_error_handling.htm.
It's possible that the coverage of all classes (including the one that had 0%) was above 75%. Salesforce requires the overall test coverage to be atleast 75%. However the good practice is to ensure that each apex class has atleast 75% so that future deployments don't have any issues.
That documentation link is broken.