Find your content:

Search form

You are here

Method does not exist or incorrect signature

 
Share

I'm trying to complete a some test code and am running into the 'Method does not exist or incorrect signature' error.

I have a data factory class that generates some test records for other test classes.

   @isTest
    public class ABCTestDataFactory {
        public static ABC_Store__c createOneStore(String storeName) {
            ABC_Store__c s = new ABC_Store__c();
            s.Name = storeName;
            insert s;

            return s;
        }

            //other similar methods
     }

When referencing the createOneStore() method in this class from my test method I'm receiving the error...what am I doing wrong here?

@isTest
private class TestUpdateStageInformation {

    static testMethod void TestUpdateOneStageProbability() {
        //create the objects required before creating an opportunity
        ABC_Store__c s = ABC_TestDataFactory.createOneStore('The Test Store 1'); //this is where the error is happening
        ABC_Account__c account = ABC_TestDataFactory.createOneAccount('99999999999', 'TestLastName', TRUE, s.ID);

        Test.startTest();
                   //tests
        Test.stopTest();
    }
}

This is all created in a Developer Org. Thanks for any help you can give.


Attribution to: Scott McClung

Possible Suggestion/Solution #1

Your declaration in the first block is ABCTestDataFactory, whereas when you're using it , it's ABC_TestDataFactory (with an underscore)

Unless its a typo in your post, that would be the reason?


Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1787

My Block Status

My Block Content