Package com.volantis.mcs.protocols.trans

Examples of com.volantis.mcs.protocols.trans.ElementHelper


    /**
     * Simple method test
     */
    public void testIsTable() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();
        Element table = domFactory.createElement();
        Element span = domFactory.createElement();
        table.setName("table");
        span.setName("span");

        assertTrue("table not indicated as isTable",
                   helper.isTable(table));
        assertTrue("span is indicated as isTable",
                   !helper.isTable(span));
    }
View Full Code Here


    /**
     * Simple method test
     */
    public void testIsRow() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();
        Element row = domFactory.createElement();
        Element span = domFactory.createElement();
        row.setName("tr");
        span.setName("span");

        assertTrue("tr not indicated as isRow",
                   helper.isRow(row));
        assertTrue("span is indicated as isRow",
                   !helper.isRow(span));
    }
View Full Code Here

    /**
     * Simple method test
     */
    public void testIsCell() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();
        Element cell = domFactory.createElement();
        Element span = domFactory.createElement();
        Element th = domFactory.createElement();
        cell.setName("td");
        span.setName("span");
        th.setName("th");

        assertTrue("td not indicated as isCell",
                   helper.isCell(cell));
        assertTrue("span is indicated as isCell",
                   !helper.isCell(span));
        assertTrue("th not indicated as isCell",
                   helper.isCell(th));
    }
View Full Code Here

    /**
     * Simple method test
     */
    public void testGetTable() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();

        assertEquals("getTable failed",
                     helper.getTable(),
                     "table");
    }
View Full Code Here

    /**
     * Simple method test
     */
    public void testGetRow() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();

        assertEquals("getRow failed",
                     helper.getRow(),
                     "tr");
    }
View Full Code Here

    /**
     * Simple method test
     */
    public void testGetCell() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();

        assertEquals("getCell failed",
                     helper.getCell(),
                     "td");
    }
View Full Code Here

    /**
     * Simple method test
     */
    public void testGetCells() {
        ElementHelper helper = XHTMLBasicElementHelper.getInstance();
        String[] cells = { "td", "th" };
        String[] actuals = helper.getCells();

        assertEquals("getCells failed to return the expected number of " +
                     "options",
                     actuals.length,
                     cells.length);
View Full Code Here

    }

    private void initializeElementHelper() {
        // Simple tables only (no table sections) with one type of
        // cell.
        elementHelper = new ElementHelper() {
            protected final String table = "table";
            protected final String row = "tr";
            protected final String cell = "td";
            protected final String[] cells = {cell};
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.trans.ElementHelper

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.