You need to sign in to do that
Don't have an account?
Krishna Sahu 1
I need to write test class with assertion please help me on this
@HttpGet
global static List<Patient_Goal__c> getRecords() {
RestRequest request = RestContext.request;
System.debug('request.requestURI: '+request.requestURI);
System.debug('request.params.get(\'patientId\'): '+request.params.get('patientId'));
String ids = request.params.get('patientId');
System.debug(ids);
List<String> listInvIds = ids.split(',');
List<Patient_Goal__c> result =[SELECT Id , Name,goal__c,CurrencyIsoCode,patient__c
FROM Patient_Goal__c
WHERE patient__c = :listInvIds];
return result;
}
global static List<Patient_Goal__c> getRecords() {
RestRequest request = RestContext.request;
System.debug('request.requestURI: '+request.requestURI);
System.debug('request.params.get(\'patientId\'): '+request.params.get('patientId'));
String ids = request.params.get('patientId');
System.debug(ids);
List<String> listInvIds = ids.split(',');
List<Patient_Goal__c> result =[SELECT Id , Name,goal__c,CurrencyIsoCode,patient__c
FROM Patient_Goal__c
WHERE patient__c = :listInvIds];
return result;
}
Find your Test Class with 100% Coverage.
don't forget to mark it as best answer.
Thank you
Hey Krishna,
You can learn from this article :-
https://developer.salesforce.com/forums/?id=906F00000008pUrIAI
If it helps, kindly mark it as the best answer.
Thank you
Priya Ranjan