Class MockQieByQueryConsumer
- java.lang.Object
-
- com.funnelback.plugin.index.consumers.mock.MockQieByQueryConsumer
-
- All Implemented Interfaces:
QieByQueryConsumer
public class MockQieByQueryConsumer extends Object implements QieByQueryConsumer
A mockQieByQueryConsumer
that may be used when testingIndexingConfigProvider.supplyQieByQuery(IndexConfigProviderContext, QieByQueryConsumer)
. Example:MockIndexConfigProviderContext mockContext = new MockIndexConfigProviderContext(); MockQieByQueryConsumer mockConsumer = new MockQieByQueryConsumer(); ExamplePluginIndexingConfigProvider underTest = new ExamplePluginIndexingConfigProvider(); underTest.supplyQieByQuery(mockContext, mockConsumer); Assert.assertTrue("Assert something useful.", mockConsumer.getInvocations().size() >= 0);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockQieByQueryConsumer.MockQieByQueryInvocation
Holds the values thatapplyQieWhenQueryMatches(double, String)
was called with.
-
Field Summary
Fields Modifier and Type Field Description private List<MockQieByQueryConsumer.MockQieByQueryInvocation>
invocations
Hold the values of all invocations ofapplyQieWhenQueryMatches(double, String)
.
-
Constructor Summary
Constructors Constructor Description MockQieByQueryConsumer()
-
-
-
Field Detail
-
invocations
private final List<MockQieByQueryConsumer.MockQieByQueryInvocation> invocations
Hold the values of all invocations ofapplyQieWhenQueryMatches(double, String)
.
-
-
Method Detail
-
applyQieWhenQueryMatches
public void applyQieWhenQueryMatches(double qieWeight, String query) throws IllegalArgumentException
- Specified by:
applyQieWhenQueryMatches
in interfaceQieByQueryConsumer
- Throws:
IllegalArgumentException
-
-