Class MockGscopeByRegexConsumer
- java.lang.Object
-
- com.funnelback.plugin.index.consumers.mock.MockGscopeByRegexConsumer
-
- All Implemented Interfaces:
com.funnelback.plugin.index.consumers.GscopeByRegexConsumer
public class MockGscopeByRegexConsumer extends Object implements com.funnelback.plugin.index.consumers.GscopeByRegexConsumer
A mockGscopeByRegexConsumer
that may be used when testingIndexingConfigProvider.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);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockGscopeByRegexConsumer.MockGscopeByRegexInvocation
Holds the values thatapplyGscopeWhenRegexMatches(String, String)
was called with.
-
Field Summary
Fields Modifier and Type Field Description private List<MockGscopeByRegexConsumer.MockGscopeByRegexInvocation>
invocations
Hold the values of all invocations ofapplyGscopeWhenRegexMatches(String, String)
.
-
Constructor Summary
Constructors Constructor Description MockGscopeByRegexConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGscopeWhenRegexMatches(String gscopeName, String query)
List<MockGscopeByRegexConsumer.MockGscopeByRegexInvocation>
getInvocations()
Hold the values of all invocations ofapplyGscopeWhenRegexMatches(String, String)
.
-
-
-
Field Detail
-
invocations
private final List<MockGscopeByRegexConsumer.MockGscopeByRegexInvocation> invocations
Hold the values of all invocations ofapplyGscopeWhenRegexMatches(String, String)
.
-
-
Method Detail
-
applyGscopeWhenRegexMatches
public void applyGscopeWhenRegexMatches(String gscopeName, String query) throws IllegalArgumentException
- Specified by:
applyGscopeWhenRegexMatches
in interfacecom.funnelback.plugin.index.consumers.GscopeByRegexConsumer
- Throws:
IllegalArgumentException
-
getInvocations
public List<MockGscopeByRegexConsumer.MockGscopeByRegexInvocation> getInvocations()
Hold the values of all invocations ofapplyGscopeWhenRegexMatches(String, String)
.
-
-