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

How to write test method for web service method?

How to write test method for the following web service method?


 public String resetPassword(Long contactId,String userName,String passWord,Integer updatedBy) {
            serviceFlorenceWeaComNew.resetPassword request_x = new serviceFlorenceWeaComNew.resetPassword();
            serviceFlorenceWeaComNew.resetPasswordResponse response_x;
            request_x.contactId = contactId;
            request_x.userName = userName;
            request_x.passWord = passWord;
            request_x.updatedBy = updatedBy;
            Map<String, serviceFlorenceWeaComNew.resetPasswordResponse> response_map_x = new Map<String, serviceFlorenceWeaComNew.resetPasswordResponse>();
            response_map_x.put('response_x', response_x);
            response_x = response_map_x.get('response_x');
            return response_x.return_x;

Best Answer chosen by richfer_

You can check here


If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.