Class MockGscopeByRegexConsumer
- java.lang.Object
-
- com.funnelback.plugin.index.consumers.mock.MockGscopeByRegexConsumer
-
- All Implemented Interfaces:
GscopeByRegexConsumer
public class MockGscopeByRegexConsumer extends Object implements GscopeByRegexConsumer
A mockGscopeByRegexConsumerthat 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 classMockGscopeByRegexConsumer.MockGscopeByRegexInvocationHolds the values thatapplyGscopeWhenRegexMatches(String, String)was called with.
-
Field Summary
Fields Modifier and Type Field Description private List<MockGscopeByRegexConsumer.MockGscopeByRegexInvocation>invocationsHold 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 voidapplyGscopeWhenRegexMatches(String gscopeName, String query)
-
-
-
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:
applyGscopeWhenRegexMatchesin interfaceGscopeByRegexConsumer- Throws:
IllegalArgumentException
-
-