Search in sources :

Example 1 with FlowParagraphData

use of org.terasology.engine.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.engine.rendering.nui.widgets.browser.data.DocumentData) FlowParagraphData(org.terasology.engine.rendering.nui.widgets.browser.data.basic.FlowParagraphData) ParagraphData(org.terasology.engine.rendering.nui.widgets.browser.data.ParagraphData) FlowParagraphData(org.terasology.engine.rendering.nui.widgets.browser.data.basic.FlowParagraphData) Test(org.junit.jupiter.api.Test)

Aggregations

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