0

We are using outside wrapper class to store requested parameters and passing req.params into that wrapper class. Then we are using those wraper class parameters in httpGet/httpPost etc. How to include that wraper class and http methods in test classes, and how to pass parameters into wrapper class in Test Code. please give me a thought or any example code.

1 Answer 1

2

The test classes can reference the wrapper classes directly if they are public or if they are not public you can add @IsTestVisible to make them visible to the tests. You may choose to add extra methods or constructors to make construction in the test context simpler too.

If those wrapper classes are in the signature of your HTTP methods then you can just call those static methods directly from your Apex tests to test them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .