Class 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 interface DocumentType doesn't already exist. Example creating a DocumentType that claims to be HTML with a specific value for what is returned by DocumentType.asContentType(). new MockDocumentType().withHTML(true).withContentType("something/specific");
    • Field Detail

      • HTML

        public boolean HTML
      • XML

        public boolean XML
      • JSON

        public boolean JSON
      • contentType

        public String contentType
    • Constructor Detail

      • MockDocumentType

        public MockDocumentType()
        Construct a DocumentType where the cotent type is unknown.