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

Wrapper Test
Hi, i try to test my wrapper class but i have actually 0% coverage.
My wrapper is like :
public class EU01AccountApiWrapper { public String code; public String name; public cls_status status; public String website; ...In my test method i have try to create a wrapper
EU01AccountApiWrapper wrapper= new EU01AccountApiWrapper(); wrapper.code = 'Test Wrapper'; wrapper.name = 'Test Wrapper';
But i have 0%. How can i do ? Ty :)
No need to cover this wrapper class.There are no executable lines of code in your class.Variable declarions are not counted as part of code coverage.
If you have constructor in your wrapper class then you have to cover that because it is executable.
Please refer below link which might help you in this
https://salesforce.stackexchange.com/questions/288405/wrapper-class-is-not-covered-in-the-test-class
If you have contructor in your wrapper class try this way
https://developer.salesforce.com/forums/?id=9060G000000MVoaQAG
Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.
Thanks and Regards
All Answers
No need to cover this wrapper class.There are no executable lines of code in your class.Variable declarions are not counted as part of code coverage.
If you have constructor in your wrapper class then you have to cover that because it is executable.
Please refer below link which might help you in this
https://salesforce.stackexchange.com/questions/288405/wrapper-class-is-not-covered-in-the-test-class
If you have contructor in your wrapper class try this way
https://developer.salesforce.com/forums/?id=9060G000000MVoaQAG
Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.
Thanks and Regards