You need to sign in to do that
Don't have an account?
Harsha Shri
Need help in Test class for wrapper class
Hi All,
I need help in writing test class for wrapper class. This is my class
Please help me with test class
Thank you very much
I need help in writing test class for wrapper class. This is my class
public class Wrapper{ public class Item { public Boolean checked{ get; set; } public Sobject sobj { get; set;} public O2r__x O1{ get; set;} public O1r__x O2{ get; set;} public String Type{ get; set;} public String ExternalID{ get; set;} public String id{ get; set;} public String sname{ get; set;} public Double net{ get; set;} public Item(Sobject so,String type){ sobj=so; if(type=='chp'){ O2=(O1r__x)so; ExternalID=O2.ExternalID; id=O2.id; sname=O2.sname__c; net=O2.net__c; } if(type=='odr'){ O1=(O2r__x)so; ExternalID=O1.ExternalID; id=O1.id; sname=O1.sname__c; } this.Type=type; checked = false; } } }
Please help me with test class
Thank you very much
Unfortunately, it doesn't seem like you can test this the way you normally would. I was talking with Pat Patterson [1][2] and the only way to do this is to carefully wrap your remote object queries with isRunningTest and return data there. The ability should be "coming soon."
[1] https://twitter.com/metadaddy/status/659074056369500160
[2] https://twitter.com/metadaddy/status/659075008757567488
More Info:
https://developer.salesforce.com/forums/?id=906F00000005HkFIAU
Hope this helps you!
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
All Answers
Unfortunately, it doesn't seem like you can test this the way you normally would. I was talking with Pat Patterson [1][2] and the only way to do this is to carefully wrap your remote object queries with isRunningTest and return data there. The ability should be "coming soon."
[1] https://twitter.com/metadaddy/status/659074056369500160
[2] https://twitter.com/metadaddy/status/659075008757567488
More Info:
https://developer.salesforce.com/forums/?id=906F00000005HkFIAU
Hope this helps you!
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com