You need to sign in to do that
Don't have an account?
Otto2020
Compile Error: Method does not exist or incorrect signature
Hi there,
Please help with this class where I am getting an error upon saving the test class below:
The error is:
Error: Compile Error: Method does not exist or incorrect signature: void getOrder(Id, Id, Id) from the type APTS_TestDataFactory at line 62
Any guidance would be most appreciated. Thank you!
Please help with this class where I am getting an error upon saving the test class below:
@isTest public class APTS_ResendCreditMemoEmailTest{ static testMethod void creditMemoDocumentGenerationTest(){ Profile profileSO = [SELECT Id FROM Profile WHERE Name = 'Standard User' LIMIT 1]; User userSO = APTS_TestDataFactory.getUser('LastName123','medidate', profileSO.ID); insert userSO; System.runAs(userSO){ EmailTemplate emailTemplateSO1 = APTS_TestDataFactory.getEmailTemplate('APTS Non Japan Invoice','APTS_Non_Japan_Invoice', userSO.ID); List<EmailTemplate> listEmailTemplate = new List<EmailTemplate>(); listEmailTemplate.add(emailTemplateSO1); insert emailTemplateSO1; } insert APTS_TestDataFactory.getTaxConnectorConfigSetting(); //Create & Insert Core Currency appirio_core__Currency__c coreCurrencyUSD = APTS_TestDataFactory.getCoreCurrency('U.S. Dollar','USD', TRUE); LIst<appirio_core__Currency__c> coreCurrencylist = new List<appirio_core__Currency__c>(); coreCurrencylist.add(coreCurrencyUSD); insert coreCurrencylist; APTS_Legal_Entity__c legalEntitySO= APTS_TestDataFactory.getLegalEntity('Japan', coreCurrencyUSD.ID, FALSE); legalEntitySO.APTS_LE_Company_Code__c = 'ABC'; legalEntitySO.APTS_LE_Country__c = 'DEF'; insert legalEntitySO; Apttus_Config2__PaymentTerm__c paymentTermSO = APTS_TestDataFactory.createPaymentTerm('Net 120', 'Net 120 Days', 120 , TRUE); insert paymentTermSO; APTS_Invoice_Number_Settings__c invoiceNumberSettingSO = APTS_TestDataFactory.getInvoiceNumberSetting(legalEntitySO.ID); insert invoiceNumberSettingSO; //Create & Insert Account Account accSO = APTS_TestDataFactory.getAccount('Test Account'); accSO.APTS_Global_MSA__c = TRUE; insert accSO; Contact contactSO1 = APTS_TestDataFactory.getContact(accSO.ID, 'Japan', 'Last1', 'Japan'); Contact contactSO2 = APTS_TestDataFactory.getContact(accSO.ID, 'Esker', 'Last2', 'Japan'); List<Contact> listContact = new List<Contact>(); listContact.add(contactSO1); listContact.add(contactSO2); insert listContact; Apttus_Config2__AccountLocation__c accountLocationSO1 = APTS_TestDataFactory.getAccountLocation('USA Account Location', accSO.ID, 'USA'); accountLocationSO1.Apttus_Config2__DefaultInvoiceTemplate__c = 'APTS Non Japan Invoice'; Apttus_Config2__AccountLocation__c accountLocationSO2 = APTS_TestDataFactory.getAccountLocation('USA Account Location', accSO.ID, 'USA'); List<Apttus_Config2__AccountLocation__c> accountLocationList = new List<Apttus_Config2__AccountLocation__c>(); accountLocationList.add(accountLocationSO1); accountLocationList.add(accountLocationSO2); insert accountLocationList; Opportunity oppSO1 = APTS_TestDataFactory.getOppty(accSO.ID, 'USA Opp'); Opportunity oppSO2 = APTS_TestDataFactory.getOppty(accSO.ID, 'USA Opp'); List<Opportunity> oppList = new List<Opportunity>(); oppList.add(oppSO1); oppList.add(oppSO2); insert oppList; Apttus_Config2__Order__c orderSo = APTS_TestDataFactory.getOrder(accSO.Id, oppSO1.ID, accountLocationSO1.ID); orderSo.Apttus_Config2__PaymentTermId__c = paymentTermSO.ID; orderSo.APTS_Invoice_Delivery_Method_Email__c = true; orderSo.APTS_Invoice_Delivery_Method_Print__c = true; insert orderSo; Apttus_Billing__Invoice__c invoiceSO1 = APTS_TestDataFactory.getInvoice(accSO.ID, paymentTermSO.ID); invoiceSO1.APTS_Legal_Entity__c = legalEntitySO.ID; invoiceSO1.Apttus_Billing__LocationId__c = accountLocationSO1.ID; invoiceSO1.APTS_Order__c = orderSo.ID; Apttus_Billing__Invoice__c invoiceSO2 = APTS_TestDataFactory.getInvoice(accSO.ID, paymentTermSO.ID); invoiceSO2.APTS_Legal_Entity__c = legalEntitySO.ID; invoiceSO2.Apttus_Billing__LocationId__c = accountLocationSO2.ID; invoiceSO2.APTS_Order__c = orderSo.ID; List<Apttus_Billing__Invoice__c> invoiceList = new List<Apttus_Billing__Invoice__c>(); invoiceList.add(invoiceSO1); invoiceList.add(invoiceSO2); insert invoiceList; Apttus_Billing__CreditMemo__c creditMemoSO = APTS_TestDataFactory.getCreditMemmo(accSO.ID, invoiceSO1.ID); creditMemoSO.APTS_Legal_Entity__c = legalEntitySO.ID; creditMemoSO.Apttus_Billing__LocationId__c = accountLocationSO1.ID; creditMemoSO.APTS_Shipping_Location__c = accountLocationSO1.ID; //creditMemoSO.Apttus_Billing__Status__c = 'Approved'; creditMemoSO.Apttus_Billing__DeliveryStatus__c = 'Pending'; creditMemoSO.APTS_Order__c = orderSo.ID; List<Apttus_Billing__CreditMemo__c>creditMemolist = new List<Apttus_Billing__CreditMemo__c>(); creditMemolist.add(creditMemoSO); insert creditMemolist; Attachment attachmentSO = APTS_TestDataFactory.getAttachment(creditMemoSO.ID,'CreditMemo Attachment'); List<Attachment> listAttachment = new List<Attachment>(); listAttachment.add(attachmentSO); insert listAttachment; Apttus_Billing__RelatedARTransaction2__c relatedARTransactionSO = APTS_TestDataFactory.getRelatedARTransaction(invoiceSO1.ID); relatedARTransactionSO.Apttus_Billing__TxnType__c = 'Refund'; relatedARTransactionSO.Apttus_Billing__DestinationCreditMemoId__c = creditMemoSO.ID; insert relatedARTransactionSO; Test.startTest(); Test.setCurrentPageReference(new PageReference('Page.myPage')); System.currentPageReference().getParameters().put('creditMemoID', creditMemoSO.ID); System.currentPageReference().getParameters().put('status', 'Approved'); APTS_ResendCreditMemoEmail resendCreditMemoEmail = new APTS_ResendCreditMemoEmail(); resendCreditMemoEmail.resendEmail(); Test.stopTest(); } }
The error is:
Error: Compile Error: Method does not exist or incorrect signature: void getOrder(Id, Id, Id) from the type APTS_TestDataFactory at line 62
Any guidance would be most appreciated. Thank you!
Check your method getOrder
Check that it accepts 3 x Ids as input.
Check that it returns a record of object type Apttus_Config2__Order__c
Regards
Andrew
All Answers
Check your method getOrder
Check that it accepts 3 x Ids as input.
Check that it returns a record of object type Apttus_Config2__Order__c
Regards
Andrew