Package io.wcm.caravan.testing.pipeline
Class JsonPipelineContext
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- io.wcm.caravan.testing.pipeline.JsonPipelineContext
-
- All Implemented Interfaces:
org.junit.rules.TestRule
@ProviderType public final class JsonPipelineContext extends org.junit.rules.ExternalResource
JUnit rule for setting up a OSGi-based context withJsonPipelineFactory
support.
-
-
Constructor Summary
Constructors Constructor Description JsonPipelineContext(org.apache.sling.testing.mock.osgi.context.OsgiContextImpl osgiContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
before()
InMemoryCacheAdapter
getCacheAdapter()
MockingCaravanHttpClient
getCaravanHttpClient()
io.wcm.caravan.pipeline.JsonPipelineFactory
getJsonPipelineFactory()
com.codahale.metrics.MetricRegistry
getMetricRegistry()
JsonFixture
loadJson(String classpathResource)
Load a JSON fixture from classpath.
-
-
-
Method Detail
-
before
protected void before()
- Overrides:
before
in classorg.junit.rules.ExternalResource
-
getCaravanHttpClient
public MockingCaravanHttpClient getCaravanHttpClient()
- Returns:
- Mocked HTTP client
-
getMetricRegistry
public com.codahale.metrics.MetricRegistry getMetricRegistry()
- Returns:
- Mocked Metrics registry
-
getCacheAdapter
public InMemoryCacheAdapter getCacheAdapter()
- Returns:
- Returns the cacheAdapter.
-
getJsonPipelineFactory
public io.wcm.caravan.pipeline.JsonPipelineFactory getJsonPipelineFactory()
- Returns:
- JSON pipeline factory
-
loadJson
public JsonFixture loadJson(String classpathResource)
Load a JSON fixture from classpath.- Parameters:
classpathResource
- Resource path in classpath- Returns:
JsonFixture
item
-
-