Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test_MemberRestSvc - Test Class for Apex REST Service (v24)
@isTest
private class Test_MemberRestSvc {
static {
// setup test data
}
static testMethod void testDoGet() {
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = 'https://cs9.salesforce.com/services/apexrest/v.9/member/me/results/today';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response = res;
MemberRestSvc.ReturnClass results = MemberRestSvc.doGet();
System.assertEquals('true', results.success);
System.assertEquals(10, results.records.size());
System.assertEquals('Query executed successfully.', results.message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.