Class MockGscopeByRegexConsumer

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

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