Find your content:

Search form

You are here

Method does not exist or incorrect signature


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.

    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?

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);


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

My Block Status

My Block Content