function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dev_sfdc1dev_sfdc1 

Help me in test class

global class Account
{
    webService static void  getacc(Account obj,Integer id)
    {        
        obj.Number_Id__c = id;     
        insert obj;       
           
    }
}

@isTest
private class accwebservice
{
    static void testclass()
    {    
           Account.getacc(123);      
     
    }
}

Help me to write test class..
NehalNehal (Salesforce Developers) 
Hi,

Please refer to links below that will help you to create test class:

1.https://developer.salesforce.com/forums/ForumsMain?id=906F00000008z4VIAQ
2.http://salesforce.stackexchange.com/questions/22735/custom-webservice-test-class
3.http://salesforce.stackexchange.com/questions/22705/help-test-class-for-custom-webservice
4.http://salesforce.stackexchange.com/questions/25151/test-class-for-trigger-and-web-service-class

I hope this helps.
dev_sfdc1dev_sfdc1
Hi Nehal, 
How to pass webService static void  getacc(Account obj,Integer id) this values into test class.. Not getting clear idea to pass param values..
I too search and try same link as before posting here but no improvement..Can you give some more idea..

Thank You