You need to sign in to do that
Don't have an account?
Adelchi Pelizzo
Thank you.
Test class for VF controller extension
global class getipController { global static String ipAddress {get; set;} global InfoForm__c Info = new InfoForm__c(); global getipController(ApexPages.StandardController controller) { this.Info = (InfoForm__c)controller.getRecord(); ipAddress = ApexPages.currentPage().getHeaders().get('X-Salesforce-SIP'); Info.Ip__c = IpAddress; } }I am struggling to make sense with testing this visualforce controller extension. Any help to build a test clas will be very much appreaciated.
Thank you.
Following code should work for you.
Thanks,
Himanshu
I am getting - Compile Error: unexpected token: 'in' - line 2.
Even if I do this I get - Compile Error: expecting right curly bracket, found 'insert' at line 7 column 0
tthat code was not working because code should be insdie the test method as it is shown in following code
Thanks,
Himanshu