You need to sign in to do that
Don't have an account?
zeenat mangat
How to create test class of the apex controller which is create by using REST api
Can we create the test class of the Lead controller that uses the REST api for Request url like this:
eg-
@RestResource(urlMapping='/v2/getCharged/*')
global with sharing class REST_ChargeNT_Controller {
@HttpPost
global static String processPayment(String orderId){
eg-
@RestResource(urlMapping='/v2/getCharged/*')
global with sharing class REST_ChargeNT_Controller {
@HttpPost
global static String processPayment(String orderId){
Shashank (Salesforce Developers)
Please see if this helps: http://cloudyworlds.blogspot.sg/2012/12/writing-test-classes-for-apex-rest.html