Class MockMetadataMappingConsumer

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

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