/** * Returns the position of the body element in an initial, empty, blip. */ public static int getInitialBlipBodyPosition() { IndexedDocument<Node, Element, Text> d = DocProviders.POJO.build( TitleHelper.emptyDocumentWithTitle(), DocumentSchema.NO_SCHEMA_CONSTRAINTS); return getBodyPosition(d); }
/** * Test that the head of the document built by emptyDocumentWithTitle matches * the initial head in ConversationConstants.BLIP_INITIAL_HEAD. **/ public void testEmptyDocumentWithTitle() { IndexedDocument<Node, Element, Text> d = DocProviders.POJO.build( TitleHelper.emptyDocumentWithTitle(), DocumentSchema.NO_SCHEMA_CONSTRAINTS); String message = Blips.INITIAL_CONTENT.toString() + " expected, found " + XmlStringBuilder.innerXml(d).toString(); assertTrue(message, DocCompare.equivalent(DocCompare.STRUCTURE, Blips.INITIAL_CONTENT.toString(), d)); }
/** * Test that the head of the document built by emptyDocumentWithTitle matches * the initial head in ConversationConstants.BLIP_INITIAL_HEAD. **/ public void testEmptyDocumentWithTitle() { IndexedDocument<Node, Element, Text> d = DocProviders.POJO.build( TitleHelper.emptyDocumentWithTitle(), DocumentSchema.NO_SCHEMA_CONSTRAINTS); String message = Blips.INITIAL_CONTENT.toString() + " expected, found " + XmlStringBuilder.innerXml(d).toString(); assertTrue(message, DocCompare.equivalent(DocCompare.STRUCTURE, Blips.INITIAL_CONTENT.toString(), d)); }