You need to sign in to do that
Don't have an account?

Test Class for simple Controller Extension
Hi folks,
I've written a really simple controller extension for a custom object, that ensures the "target" of my Visualforce page is only ever one record (there only exists one record for this object, it's a kind of "joining object").
The class is below, but I'm struggling to get my head round what my test class should try and invoke. Any help massively appreciated!
Thanks,
Lee
public class BPT_SummaryViewController{ public BPT_SummaryViewController(ApexPages.StandardController projcon){} public Bid_Planning_Summary__c getSummary(){ Bid_Planning_Summary__c a = [select id from Bid_Planning_Summary__c][0]; return a; } }
Hi Lee,
Say Employee is your custom object type.
Hope the below code helps!
All Answers
Hi Lee,
Say Employee is your custom object type.
Hope the below code helps!
Brilliant, with the appropriate modifications to match my custom object, I got 100% code coverage and my first ever Visualforce page is working fine.
Thank you very much!