function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi all,
I have developed apex web service class which is further used by the flex page for insert ,update,delete,update in Salesforce.
My question is for if i want to deploy my application in appexchange then i need to write test class and method for my apex code.
So that i could deploy my application into Appexchange.
Please guide me what should be the suitable test class code for my web service class.
I have mentioned sample code for my web service class below:
global class Questions
{
webService static List<QuestionType__c> getQuestionType(Id id) { List<QuestionType__c> qType = [select id, name, Name__c, Summary__c from QuestionType__c where id = id) ]; return qType; } webService static List<QuestionType__c> getAllQuestionType() { List<QuestionType__c> qType = [select id, name, Name__c, Summary__c from QuestionType__c LIMIT 50]; return qType; } webService static Id insertQuestionType(QuestionType__c qType) { insert qType; return qType.Id; } webService static Id updateQuestionType(QuestionType__c qType) { update qType; return qType.Id; } webService static Id deleteQuestionType(Id id) { QuestionType__c[] removeQType = [select id, name, Name__c, Summary__c from QuestionType__c where id = id)]; String returnVar = removeQType[0].id; delete removeQType; return returnVar; }}
Regards,
Manoj Jain