i wrote 4 test classes (StandardSetController ) two classes working fine

but remaining two are throw the above error error ( 4 test classes using same synatx) please any body help me

Class :

public with sharing class ingController {
    public List<test__c >AllItest{ get; set; }
      public static String testid = '001'; 

    public ingController(ApexPages.StandardSetController sc) {
            Selected = ApexPages.currentPage().getParameters().get('id');
     public PageReference Init() {


test class

public class ingControllerTest {

    public static testmethod void ingController(){
        test__c inv = new test__c();
        inv.name = 'test';
        inv.email__c = 'test@test.com';

        insert inv;
         ApexPages.StandardController sc = new 

        ingController Controller=new ingController(sc);

Your class constructor is accepting StandardSetController as parameter but in your test class you are passing in StandardController. if you align them it will fix the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.