Class MockMetadataMappingConsumer
- java.lang.Object
-
- com.funnelback.plugin.index.consumers.mock.MockMetadataMappingConsumer
-
- All Implemented Interfaces:
com.funnelback.plugin.index.consumers.MetadataMappingConsumer
public class MockMetadataMappingConsumer extends Object implements com.funnelback.plugin.index.consumers.MetadataMappingConsumer
A mockKillByPartialMatchConsumer
that may be used when testingIndexingConfigProvider.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);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockMetadataMappingConsumer.MockMetadataMappingInvocation
Holds the values thatmap(String, MetadataType, MetadataSourceType, String)
was called with.
-
Field Summary
Fields Modifier and Type Field Description private List<MockMetadataMappingConsumer.MockMetadataMappingInvocation>
invocations
Hold the values of all invocations ofmap(String, MetadataType, MetadataSourceType, String)
.
-
Constructor Summary
Constructors Constructor Description MockMetadataMappingConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MockMetadataMappingConsumer.MockMetadataMappingInvocation>
getInvocations()
Hold the values of all invocations ofmap(String, MetadataType, MetadataSourceType, String)
.void
map(String metadataClass, com.funnelback.plugin.index.model.metadatamapping.MetadataType type, com.funnelback.plugin.index.model.metadatamapping.MetadataSourceType sourceType, String locator)
-
-
-
Field Detail
-
invocations
private final List<MockMetadataMappingConsumer.MockMetadataMappingInvocation> invocations
Hold the values of all invocations ofmap(String, MetadataType, MetadataSourceType, String)
.
-
-
Method Detail
-
map
public void map(String metadataClass, com.funnelback.plugin.index.model.metadatamapping.MetadataType type, com.funnelback.plugin.index.model.metadatamapping.MetadataSourceType sourceType, String locator) throws IllegalArgumentException
- Specified by:
map
in interfacecom.funnelback.plugin.index.consumers.MetadataMappingConsumer
- Throws:
IllegalArgumentException
-
getInvocations
public List<MockMetadataMappingConsumer.MockMetadataMappingInvocation> getInvocations()
Hold the values of all invocations ofmap(String, MetadataType, MetadataSourceType, String)
.
-
-