I've written some custom code (based loosely on the donations.cls from the example unmanaged package) and need to write unit tests now that the code is set and ready to deploy. (I know, I know, tests should have been written long ago!)
Very specifically, I've gotten everything set up in my unit test as I would if I were simply entering information on the form via the gui, but when calling the "Submit()" method, I get an "argument 3 cannot be null" error somewhere in the managed package after the cnpxmlstring.Send_Transaction_api(cnpxmlstring.xml file); call. Any idea of something I might be doing wrong?
More broadly, how do you suggest we test custom applications that use the PaaS API? Obviously, no callouts are going to happen. Do you handle spoofing a callout, and creating the resulting temporary contact/etc inside your managed package? Or should we just get as far as invoking the callout, and then in a separate test, start the flow with creating our own Temporary Contact?
Any guidance would be appreciated.
Very specifically, I've gotten everything set up in my unit test as I would if I were simply entering information on the form via the gui, but when calling the "Submit()" method, I get an "argument 3 cannot be null" error somewhere in the managed package after the cnpxmlstring.Send_Transaction_api(cnpxmlstring.xml file); call. Any idea of something I might be doing wrong?
More broadly, how do you suggest we test custom applications that use the PaaS API? Obviously, no callouts are going to happen. Do you handle spoofing a callout, and creating the resulting temporary contact/etc inside your managed package? Or should we just get as far as invoking the callout, and then in a separate test, start the flow with creating our own Temporary Contact?
Any guidance would be appreciated.
Comment