Class MockGscopeByQueryConsumer
- java.lang.Object
-
- com.funnelback.plugin.index.consumers.mock.MockGscopeByQueryConsumer
-
- All Implemented Interfaces:
GscopeByQueryConsumer
public class MockGscopeByQueryConsumer extends Object implements GscopeByQueryConsumer
A mockGscopeByQueryConsumer
that may be used when testingIndexingConfigProvider.supplyGscopesByQuery(IndexConfigProviderContext, GscopeByQueryConsumer)
. Example:MockIndexConfigProviderContext mockContext = new MockIndexConfigProviderContext(); MockGscopeByQueryConsumer mockConsumer = new MockGscopeByQueryConsumer(); ExamplePluginIndexingConfigProvider underTest = new ExamplePluginIndexingConfigProvider(); underTest.supplyGscopesByQuery(mockContext, mockConsumer); Assert.assertTrue("Assert something useful.", mockConsumer.getInvocations().size() >= 0);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockGscopeByQueryConsumer.MockGscopeByQueryInvocation
Holds the values thatapplyGscopeWhenQueryMatches(String, String)
was called with.
-
Field Summary
Fields Modifier and Type Field Description private List<MockGscopeByQueryConsumer.MockGscopeByQueryInvocation>
invocations
Hold the values of all invocations ofapplyGscopeWhenQueryMatches(String, String)
.
-
Constructor Summary
Constructors Constructor Description MockGscopeByQueryConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGscopeWhenQueryMatches(String gscopeName, String query)
-
-
-
Field Detail
-
invocations
private final List<MockGscopeByQueryConsumer.MockGscopeByQueryInvocation> invocations
Hold the values of all invocations ofapplyGscopeWhenQueryMatches(String, String)
.
-
-
Method Detail
-
applyGscopeWhenQueryMatches
public void applyGscopeWhenQueryMatches(String gscopeName, String query) throws IllegalArgumentException
- Specified by:
applyGscopeWhenQueryMatches
in interfaceGscopeByQueryConsumer
- Throws:
IllegalArgumentException
-
-