+ Start a Discussion
lalitaroralalitarora 

Test class for logout event stream?

trigger LogoutEventTrigger on LogoutEventStream (after insert) {
    
    LogoutEventStream event = Trigger.new[0];
    String EventjsonString = json.serialize(Trigger.new[0]);
    LogoutEventtriggerHandler.CreateLog(EventjsonString);    
    
}
Agustin BAgustin B
Hi lalitarora, try with this code please:
@IsTest
    private static void test(){
Test.startTest();
EventBus.publish(new LogoutEventStream());
Test.stopTest();}

If it helps please like and mark as correct, it may help others.