Class MockAutoCompletionConsumer

  • All Implemented Interfaces:
    com.funnelback.plugin.index.consumers.AutoCompletionConsumer

    public class MockAutoCompletionConsumer
    extends Object
    implements com.funnelback.plugin.index.consumers.AutoCompletionConsumer
    A mock AutoCompletionConsumer that may be used when testing IndexingConfigProvider.supplyAutoCompletionEntriesForProfiles(List, AutoCompletionConsumer). Example:
    
     MockIndexConfigProviderContext mockContext = new MockIndexConfigProviderContext();
     MockAutoCompletionConsumer mockConsumer = new MockAutoCompletionConsumer();
     ExamplePluginIndexingConfigProvider underTest = new ExamplePluginIndexingConfigProvider();
     
     underTest.supplyAutoCompletionEntriesForProfiles(List.of(mockContext), mockConsumer);
     
     Assert.assertTrue("Assert something useful.", mockConsumer.getInvocations().size() >= 0);