Package org.jboss.seam.wiki.core.action

Examples of org.jboss.seam.wiki.core.action.DirectoryHome


                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(2l); // Init!
                assert dirHome.getAvailableMenuItems().size() == 0;
            }
        }.run();
    }
View Full Code Here


            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(3l); // Init!

                assert dirHome.getMenuItems().size() == 1;

                assert dirHome.getAvailableMenuItems().size() == 1;

                WikiDirectory newMenuItem = dirHome.getAvailableMenuItems().iterator().next();
                dirHome.setSelectedChildDirectory(newMenuItem);
                dirHome.addMenuItem();

                assert dirHome.getMenuItems().size() == 2;

                assert invokeMethod("#{directoryHome.update}").equals("updated");
            }

            protected void renderResponse() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getMenuItems().size() == 2;
                WikiMenuItem[] menuItems = dirHome.getMenuItems().toArray(new WikiMenuItem[dirHome.getMenuItems().size()]);
                assert menuItems[0].getDirectoryId().equals(4l);
                assert menuItems[0].getDirectory().getId().equals(4l);
                assert menuItems[0].getDisplayPosition() == 0;
                assert menuItems[1].getDirectoryId().equals(5l);
                assert menuItems[1].getDirectory().getId().equals(5l);
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(3l); // Init!

                assert dirHome.getMenuItems().size() == 1;

                WikiMenuItem removedMenuItem = dirHome.getMenuItems().get(0);
                dirHome.removeMenuItem(removedMenuItem.getDirectoryId());

                assert invokeMethod("#{directoryHome.update}").equals("updated");
            }

            protected void renderResponse() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getMenuItems().size() == 0;
            }
        }.run();
    }
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(3l); // Init!

                assert dirHome.getMenuItems().size() == 1;

                WikiDirectory newMenuItem = dirHome.getAvailableMenuItems().iterator().next();
                dirHome.setSelectedChildDirectory(newMenuItem);
                dirHome.addMenuItem();

                WikiMenuItem removedMenuItem = dirHome.getMenuItems().get(0);
                dirHome.removeMenuItem(removedMenuItem.getDirectoryId());

                assert invokeMethod("#{directoryHome.update}").equals("updated");
            }

            protected void renderResponse() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getMenuItems().size() == 1;
                WikiMenuItem[] menuItems = dirHome.getMenuItems().toArray(new WikiMenuItem[dirHome.getMenuItems().size()]);
                assert menuItems[0].getDirectoryId().equals(5l);
                assert menuItems[0].getDisplayPosition() == 0;
            }
        }.run();
    }
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(3l); // Init!

                assert dirHome.getMenuItems().size() == 1;

                WikiDirectory newMenuItem = dirHome.getAvailableMenuItems().iterator().next();
                dirHome.setSelectedChildDirectory(newMenuItem);
                dirHome.addMenuItem();

                dirHome.moveMenuItem(1, 0);

                assert invokeMethod("#{directoryHome.update}").equals("updated");
            }

            protected void renderResponse() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getMenuItems().size() == 2;
                WikiMenuItem[] menuItems = dirHome.getMenuItems().toArray(new WikiMenuItem[dirHome.getMenuItems().size()]);
                assert menuItems[0].getDirectoryId().equals(5l);
                assert menuItems[0].getDisplayPosition() == 0;
                assert menuItems[1].getDirectoryId().equals(4l);
                assert menuItems[1].getDisplayPosition() == 1;
            }
View Full Code Here

            protected void beforeRequest() {
                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                dirHome.initEditor();

                assert dirHome.getInstance().getId().equals(2l);
                assert dirHome.isHasFeed();
                assert dirHome.getChildDocuments().size() == 1;
                assert dirHome.getMenuItems().size() == 0;
                assert dirHome.getAvailableMenuItems().size() == 0;
            }

        }.run();
    }
View Full Code Here

            protected void beforeRequest() {
                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(5l); // Init!
                assert invokeMethod("#{directoryHome.remove}").equals("removed");

                // TODO: SeamTest doesn't do navigation but we don't want to have /dirEdit_d.xhtml in the RENDER RESPONSE
                Conversation.instance().end();
                Redirect.instance().setViewId("/dirDisplay.xhtml");
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(4l); // Init!

                // Just take the first one, these should be ordered by name, but there is only one there
                WikiDocument defaultDocument = dirHome.getChildDocuments().get(0);
                dirHome.getInstance().setDefaultFile(defaultDocument);
                newDefaultDocumentId = defaultDocument.getId();

                assert invokeMethod("#{directoryHome.update}").equals("updated");
            }

            protected void renderResponse() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getDefaultFile().getId().equals(newDefaultDocumentId);
            }
        }.run();
    }
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getId().equals(3l); // Init!

                // Switch from first to second, these are ordered by name, "One", "Two"
                WikiDocument defaultDocument = dirHome.getChildDocuments().get(1);
                dirHome.getInstance().setDefaultFile(defaultDocument);
                newDefaultDocumentId = defaultDocument.getId();

                assert invokeMethod("#{directoryHome.update}").equals("updated");
            }

            protected void renderResponse() throws Exception {
                DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
                assert dirHome.getInstance().getDefaultFile().getId().equals(newDefaultDocumentId);
                assert newDefaultDocumentId.equals(7l);
            }
        }.run();
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.action.DirectoryHome

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.