Search in sources :

Example 1 with FlowParagraphData

use of org.terasology.rendering.nui.widgets.browser.data.basic.FlowParagraphData in project Terasology by MovingBlocks.

the class HTMLParserTest method testParseSimpleParagraph.

@Test
public void testParseSimpleParagraph() throws IOException, SAXException, ParserConfigurationException {
    DocumentData documentData = htmlParser.parseHTMLDocument("<body><p>Text</p></body>");
    assertEquals(1, documentData.getParagraphs().size());
    ParagraphData paragraph = documentData.getParagraphs().iterator().next();
    assertTrue(paragraph instanceof FlowParagraphData);
}
Also used : DocumentData(org.terasology.rendering.nui.widgets.browser.data.DocumentData) FlowParagraphData(org.terasology.rendering.nui.widgets.browser.data.basic.FlowParagraphData) ParagraphData(org.terasology.rendering.nui.widgets.browser.data.ParagraphData) FlowParagraphData(org.terasology.rendering.nui.widgets.browser.data.basic.FlowParagraphData) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DocumentData (org.terasology.rendering.nui.widgets.browser.data.DocumentData)1 ParagraphData (org.terasology.rendering.nui.widgets.browser.data.ParagraphData)1 FlowParagraphData (org.terasology.rendering.nui.widgets.browser.data.basic.FlowParagraphData)1