Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Test_MemberRestSvc - Test Class for Apex REST Service (v23)
private class Test_MemberRestSvc {
static {
// setup test data
static testMethod void testDoGet() {
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
// pass the req and resp objects to the method
req.requestURI = '';
req.httpMethod = 'GET';
MemberRestSvc.ReturnClass results = MemberRestSvc.doGet(req,res);
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.