function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shivani ThaparShivani Thapar 

how can I test this piece of code so I can deploy it for visual force email

public class FindunpaidInvoices {
    private final List<Invoice_Consulting__c> invoices;

    public FindunpaidInvoices() {
        invoices = [select Account__c, Invoice_Date__c, Balance_Due__c from Invoice_Consulting__c where Name = 'Unpaid'];

    public List<Invoice_Consulting__c> getUnpaidInvoices() {
        return invoices;
nitesh gadkarinitesh gadkari
 public static void Testmethod Method(){
   FindunpaidInvoices  FindInvoices=new FindunpaidInvoices ();
   List<Invoice_Consulting__c> test=FindInvoices.getUnpaidInvoices();
Shivani ThaparShivani Thapar
thanks but I get this error with that test code.. Error: Compile Error: unexpected token: 'void' at line 2 column 15 Thoughts? thx