Package org.freeplane.plugin.script.proxy

Examples of org.freeplane.plugin.script.proxy.ConvertibleHtmlText


    @Test
    public void no_exception_on_invalid_formulas_in_ConvertibleHtmlText() throws ConversionException {
        try {
            assertEquals("===ERROR",
                new ConvertibleHtmlText(newNodeModel(), null, e("html", e("body", "===ERROR"))).getPlain());
            assertEquals("=hurz!",
                new ConvertibleHtmlText(newNodeModel(), null, e("html", e("body", "=hurz!"))).getPlain());
        }
        catch (Exception e) {
            fail("formula evaluation may not fail for ConvertibleHtmlText, but got " + e);
        }
    }
View Full Code Here


    @Test
    public void to_plain_and_text_return_evaluated_ConvertibleHtmlText() throws ConversionException {
        try {
            final String html = e("html", e("body", "=1+2"));
            assertEquals("3", new ConvertibleHtmlText(newNodeModel(), null, html).getPlain());
            assertEquals("3", new ConvertibleHtmlText(newNodeModel(), null, html).getText());
        }
        catch (Exception e) {
            fail("formula evaluation may not fail for ConvertibleHtmlText, but got " + e);
        }
    }
View Full Code Here

   
    @Test
    public void to_html_and_string_return_original_html_ConvertibleHtmlText() throws ConversionException {
        try {
            final String html = e("html", e("body", "=1+2"));
            assertEquals(html, new ConvertibleHtmlText(newNodeModel(), null, html).getHtml());
            assertEquals(html, new ConvertibleHtmlText(newNodeModel(), null, html).getString());
        }
        catch (Exception e) {
            fail("formula evaluation may not fail for ConvertibleHtmlText, but got " + e);
        }
    }
View Full Code Here

 
    @Test
    public void to_plain_evaluates_formulas_in_ConvertibleHtmlText() throws ConversionException {
        try {
            assertEquals("3",
                new ConvertibleHtmlText(newNodeModel(), null, e("html", e("body", "=1+2"))).getText());
        }
        catch (Exception e) {
            fail("formula evaluation may not fail for ConvertibleHtmlText, but got " + e);
        }
    }
View Full Code Here

TOP

Related Classes of org.freeplane.plugin.script.proxy.ConvertibleHtmlText

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.