Class MockJsoupFilterContext
- java.lang.Object
-
- com.funnelback.common.filter.jsoup.MockJsoupFilterContext
-
- All Implemented Interfaces:
FilterContext
public class MockJsoupFilterContext extends Object implements FilterContext
A mock FilterContext to be used when testing Jsoup fiters. Allows a HTML document to be set, additional metadata and customData to be set and also allows for config settings to be configured. Example:// Setup the HTML document to use in the test. MockJsoupFilterContext filterContext = new MockJsoupFilterContext("<html>\n" + "<body>\n" + "<p>The HTML document used to test your filter </p>\n" + "</body>\n" + "</html>"); // Also configure some collection.cfg settings. filterContext.getSetup().getConfigSettings().put("myfilter.enabled", "true");
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.Multimap<String,String>
additionalMetadata
private Map<String,Object>
customData
private org.jsoup.nodes.Document
document
private MockJsoupSetupContext
setup
-
Constructor Summary
Constructors Constructor Description MockJsoupFilterContext(String html)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.funnelback.common.filter.jsoup.FilterContext
getAdditionalMetadata, getCustomData, getDocument, getSetup
-
-
-
-
Constructor Detail
-
MockJsoupFilterContext
public MockJsoupFilterContext(String html)
-
-