Package com.volantis.mcs.protocols.menu.shared.model

Examples of com.volantis.mcs.protocols.menu.shared.model.ElementDetailsStub


        ImageAssetReference overRef =
                new TestNormalImageAssetReference("the over url");
        icon.setNormalURL(normalRef);
        icon.setOverURL(overRef);
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new ConcreteMenuLabel(
                        new ElementDetailsStub(), createMenuText(), icon));

        // Create the renderer we are to test.
        MenuItemComponentRenderer renderer = createImageMenuItemRenderer(
                new TestDeprecatedImageOutput(), false);
View Full Code Here


     */
    public void testNullHref() throws Exception {

        // Create the menu item to test.
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new MenuLabelStub());
        item.setHref(new LiteralLinkAssetReference(null));
        item.setShortcut(new LiteralTextAssetReference("the shortcut"));

        // Check that the renderer did not open any output.
        checkUnopened(item);
View Full Code Here

     */
    public void testNullShortcut() throws Exception {

        // Create the menu item to test.
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new MenuLabelStub());
        item.setHref(new LiteralLinkAssetReference("the href"));
        item.setShortcut(null);

        // Check that the renderer did not open any output.
        checkUnopened(item);
View Full Code Here

        // Create the test text, label, and then the menu item
        final ConcreteMenuText text = new ConcreteMenuText(elementDetails);
        text.setText(menuText);
        final ConcreteMenuLabel label = new ConcreteMenuLabel(
                new ElementDetailsStub(), text);
        final ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), label);
        item.setHref(new LiteralLinkAssetReference("the href"));
        item.setShortcut(new LiteralTextAssetReference("the shortcut"));

        String expectedContent = createExpectedContent(item);
        String expected = null;
View Full Code Here

        // Extract the output from the menu item rendering as a string.
        return DOMUtilities.toString(buffer.getRoot());
    }

    protected MenuText createMenuText() {
        ConcreteMenuText text = new ConcreteMenuText(new ElementDetailsStub());
        DOMOutputBuffer textBuffer = new TestDOMOutputBuffer();
        textBuffer.writeText("[text]");
        text.setText(textBuffer);
        return text;
    }
View Full Code Here

        ConcreteMenuIcon icon = new ConcreteMenuIcon(elementDetails);
        ImageAssetReference imageRef =
                new TestNormalImageAssetReference("the normal url");
        icon.setNormalURL(imageRef);
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new ConcreteMenuLabel(
                        new ElementDetailsStub(), createMenuText(),
                        icon));

        // Create the renderer we are to test.
        MenuItemComponentRenderer renderer = createImageMenuItemRenderer(
                new TestDeprecatedImageOutput(), false);
View Full Code Here

     * @throws Exception
     */
    public void testNone() throws Exception {

        // Create the menu item to test.
        ConcreteMenuIcon icon = new ConcreteMenuIcon(new ElementDetailsStub());
        icon.setNormalURL(new TestEmptyImageAssetReference());
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new ConcreteMenuLabel(
                        new ElementDetailsStub(), createMenuText(),
                        icon));

        // Create the renderer we are to test.
        MenuItemComponentRenderer renderer = createImageMenuItemRenderer(
                new TestDeprecatedImageOutput(), true);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.menu.shared.model.ElementDetailsStub

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.