Package com.volantis.mcs.eclipse.common.odom

Examples of com.volantis.mcs.eclipse.common.odom.ODOMSelectionManager


    /**
     * Check that enable is false when a device layout is selected.
     */
    public void testEnableDeviceLayoutSelection() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here


     * Check that enable is false when a layout and an empty format are
     * selected.
     */
    public void testEnableLayoutSelection() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

    /**
     * Checks that enable is false when a multiple selection exists.
     */
    public void testEnableMultiSelect() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

    /**
     * Checks that enable is false when a constraint violation is found.
     */
    public void testEnableConstraintViolation() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getViolationFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

     * Checks that enable is true when no constraints are violated and there
     * is just a single empty selection.
     */
    public void testEnableOK() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

    /**
     * Tests that run does the required modification
     */
    public void testRunOK() throws Exception {
        ODOMElement document = createDocument(getBaseDocument());
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(
                createCommand(getOKFormatType(), selManager));

        setDocument(data, document);
        setSelectionManager(data, selManager);
View Full Code Here

     */
    protected ODOMSelectionManager createSelectionManager(ODOMElement observe) {
        ODOMSelectionFilter filter = new ODOMSelectionFilter(null, null,
                new ODOMSelectionFilterConfiguration(true, false));
        filter.include(observe);
        return new ODOMSelectionManager(filter);
    }
View Full Code Here

     * have excahnged positions
     * @throws Exception
     */
    public void testRun() throws Exception {
        ODOMElement document = createDocument(DUAL_PANE_LAYOUT_BEFORE_SWAP);
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(new SwapActionCommand(selManager));
        setDocument(data, document);
        setSelectionManager(data, selManager);
        setSelections(data, new String[]{GRID_FIRST_CELL_PATH,
                                         GRID_SECOND_CELL_PATH});
View Full Code Here

     * are selected.
     * @throws Exception
     */
    public void testEnableFailure() throws Exception {
        ODOMElement document = createDocument(DUAL_PANE_LAYOUT_BEFORE_SWAP);
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(new SwapActionCommand(selManager));
        setDocument(data, document);
        setSelectionManager(data, selManager);
        setSelections(data, new String[]{GRID_PATH, GRID_FIRST_CELL_PATH});
        // perform the test.
View Full Code Here

     * Test that swap is enabled when the two panes are selected.
     * @throws Exception
     */
    public void testEnableSuccess() throws Exception {
        ODOMElement document = createDocument(DUAL_PANE_LAYOUT_BEFORE_SWAP);
        ODOMSelectionManager selManager = createSelectionManager(document);
        TestData data = createTestData(new SwapActionCommand(selManager));
        setDocument(data, document);
        setSelectionManager(data, selManager);
        setSelections(data, new String[]{GRID_SECOND_CELL_PATH,
                                         GRID_FIRST_CELL_PATH});
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.common.odom.ODOMSelectionManager

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.