Activity Forums Salesforce® Discussions How can I invoke a wrapper class in a test class in Salesforce?

  • How can I invoke a wrapper class in a test class in Salesforce?

     D updated 2 years, 6 months ago 3 Members · 3 Posts
  • PRANAV

    Member
    September 9, 2016 at 1:52 pm

    Hi All,

    How can I invoke a wrapper class in a test class?

    Thanks

  • Mohit

    Member
    September 13, 2016 at 5:38 am

    Hi Pranav,

    You can invoke the wrapper class in test class in this way:-

    ClassName.WrapperClassName objectName  = new ClassName.WrapperClassName();

    objectName.VariableName = parameter;//pass the values to the wrapper class variable

    or

    objectName.FuntionName();//to call the wrapper class function.

  • D

    Member
    May 27, 2019 at 9:21 am

    how we can add pagination to wrapper class?

Viewing 1 - 3 of 3 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos