You need to sign in to do that
Don't have an account?
Connor Small 5
Help on Custom Controller Test Class
I have a fairly simple controller that queries a record and references values from the record in order to render other VF pages.
How can I write a test class for this Controller?
How can I write a test class for this Controller?
public class MyController { public Account account { get; set; } public MyController() { account = [SELECT Id, Name, Billing_Tier__c, Primary_Contact_Full_Name__C,Secondary_Contact_Full_Name__c,One_Line_Address__c FROM Account WHERE Id = :ApexPages.currentPage().getParameters().get('id')]; } }
Try the below test class:
Thanks,
Maharajan.C