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
John L Schneider IIJohn L Schneider II 

Test class for 1 line class?

I'm tired and overthinking this.  I think.  Can someone give me a hand and either point me in the right direction or just write the test class for this?

Thanks!
 
public with sharing class InvocableLogger {

@InvocableMethod  

public static void log(List<String> messages){               

System.debug(messages);

}

}

Y'all are awesome!
Best Answer chosen by John L Schneider II
Rahul.MishraRahul.Mishra
Here is the test class with 100% test coverage:
 
@isTest 
private class InvocableLogger_Test {
    static testMethod void testLog() {
        
        List<String> lstMessageString = new List<String>{'Hi', 'How Are You', 'Long Time No see'};
        InvocableLogger.log(lstMessageString);
        
    }
}

Please mark answer as best if it helps you.