Package com.funnelback.filter.api.mock
Class MockDocumentType
- java.lang.Object
-
- com.funnelback.filter.api.mock.MockDocumentType
-
- All Implemented Interfaces:
DocumentType
public class MockDocumentType extends Object implements DocumentType
Use this to create a DocumentType for testing when a preexisting DocumentType on the interfaceDocumentType
doesn't already exist. Example creating a DocumentType that claims to be HTML with a specific value for what is returned byDocumentType.asContentType()
.new MockDocumentType().withHTML(true).withContentType("something/specific");
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.funnelback.filter.api.DocumentType
DocumentType._DocumentType
-
-
Field Summary
Fields Modifier and Type Field Description String
contentType
boolean
HTML
boolean
JSON
boolean
XML
-
Fields inherited from interface com.funnelback.filter.api.DocumentType
APPLICATION_JSON_TEXT, MIME_APPLICATION_JSON_TEXT, MIME_CSV_TEXT, MIME_HTML_TEXT, MIME_TEXT_PLAIN, MIME_UNKNOWN, MIME_XHTML_TEXT, MIME_XHTML_XML, MIME_XML_TEXT
-
-
Constructor Summary
Constructors Constructor Description MockDocumentType()
Construct a DocumentType where the cotent type is unknown.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asContentType()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.funnelback.filter.api.DocumentType
isHTML, isJSON, isXML
-
-
-
-
Field Detail
-
HTML
public boolean HTML
-
XML
public boolean XML
-
JSON
public boolean JSON
-
contentType
public String contentType
-
-
Method Detail
-
asContentType
public String asContentType()
- Specified by:
asContentType
in interfaceDocumentType
-
-