Created
March 21, 2012 10:54
-
-
Save jeffdonthemic/2146160 to your computer and use it in GitHub Desktop.
Test_MemberRestSvc - Test Class for Apex REST Service (v24)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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