fork download
  1. @isTest private static void test_ProcessLead13() {
  2.  
  3. List<User> u = [select id, username from User limit 1 ];
  4. List<Lead> lead1 = [select id,name,Lead_Number__c from Lead limit 1];
  5.  
  6. List<Loan_Application__c> loanApps= TestDataFactoryTW.createTWLoanApplication(accounts.get(0),contacts.get(0));
  7.  
  8. List<Applicant__c> applicants = TestDataFactoryTW.createTWApplicant(loanApps.get(0));
  9. applicants[0].Contact__c = null;
  10. update applicants[0];
  11.  
  12. List<Integration_Message__c> msgs = new List<Integration_Message__c>();
  13. List<Loan_Application__c> loans = [select Id, Name, Account__c,Customer__r.Id, Customer__r.CRN__c, Applicant__c, Applicant__r.Contact__c, Stage__c, Stage_by_Integration_Status__c,Business_Unit__c from Loan_Application__c limit 1];
  14. loans[0].Customer__r.CRN__c = '888888';
  15. loans[0].Stage__c = GlobalConstants.LOAN_APPLICATION_STAGE_DISBURSED;
  16. loans[0].Customer__r.Id = contacts[0].Id;
  17. loans[0].Business_Unit__c = GlobalConstants.APPLICATION_BUSINESS_UNIT_CONSUMER_DURABLES;
  18.  
  19.  
  20.  
  21. update loans;
  22. List<Event> events = [select Subject, ActivityDateTime, Mobile__c, Alternate_Email__c, Description, Address_Type__c, DurationInMinutes,
  23. Actual_Appointment_Date__c
  24.  
  25. String requestStructure = '{"Reschedule_Time":"12:37:00.000","Reschedule_Date":"2022-05-27","longitude":"0.0","latitude":"0.0","timestamp":"","remarks":"Baad me karega","sub_dispositions":"Call back","dispositions":"Follow-up","dispositionId":"D-014","businessUnit":"Two Wheeler","type":"Loan","Lead_Loan_number":"0358893592","username":"sfdc-tw@persistent.com.twusgrp1","requestHeaderSource":"Mobile"}';
  26. System.debug('requestStructure : '+requestStructure);
  27.  
  28.  
  29. Test.startTest();
  30. CF_ALL_UpdateLeadLoanRequestProcessor requestProcessor = new CF_ALL_UpdateLeadLoanRequestProcessor();
  31. IRestResponseWrapper response = (IRestResponseWrapper) requestProcessor.process(requestStructure);
  32.  
  33. Test.stopTest();
  34.  
  35. }
Success #stdin #stdout #stderr 0.01s 7752KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog:1: expected expression