I Get te following error on my testclass: Method does not exist or incorrect signature: void isEmpty(). There are several answers to this but I still dont understand what is wrong with my testclass.
Class
public class CreateFactuurregel {
public void CreateFactuurregel(){
List<Account> acc= [SELECT Name,Debiteurenrnummer__c FROM Account WHERE Bestuurdersaansprakelijkheidsverzekering__c = true AND RecordTypeId ='0125800000010Rk'];
for(integer x=0;x<acc.size();x++){
Factuurregel__c fact =new Factuurregel__c(Organisatie__c=acc[x].Name, Debiteur__c = acc[x].Debiteurenrnummer__c ,
Aantal__c = 1, Product__c= 'Bestuurdersaansprakelijkheidsverzekering', Factuurdatum__c= date.today()
);
insert fact;
}
}
}
Test
@isTest
public class CreateFactuurregelTest {
static testMethod void createFactuurregelstest() {
Account acct = new Account(Name = 'testname', recordtypeId='0125800000010Rk',Bestuurdersaansprakelijkheidsverzekering__c=true);
insert acct;
CreateFactuurregel fr = new CreateFactuurregel();
system.assert(!fr.isEmpty());
}
}