Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.Tab


        assertEquals("Test new tab name should be 17 characters long", TabTemplate.MAX_TAB_NAME_LENGTH + 1, newTabName
                .length());

        try
        {
            Tab fordTab1 = jpaTabMapper.findById(fordsFirstTabId);
            fordTab1.setTabName(newTabName);
            getEntityManager().flush();
        }
        catch (InvalidStateException validationException)
        {
            exceptionOccurred = true;
View Full Code Here


     * Test that a tab can have a tab name that's 1 character long.
     */
    @Test
    public void testTabNameAtMinLengthConstraint()
    {
        Tab fordTab1 = jpaTabMapper.findById(fordsFirstTabId);
        fordTab1.setTabName("1");
        getEntityManager().flush();
    }
View Full Code Here

        String newTabName = ValidationTestHelper.generateString(TabTemplate.MAX_TAB_NAME_LENGTH);

        assertEquals("Test new tab name should be 17 characters long", TabTemplate.MAX_TAB_NAME_LENGTH, newTabName
                .length());

        Tab fordTab1 = jpaTabMapper.findById(fordsFirstTabId);
        fordTab1.setTabName(newTabName);
        getEntityManager().flush();
    }
View Full Code Here

        String message = "lists should be set appropriately";

        TabGroup sut = new TabGroup();

        ArrayList<Tab> tabs = new ArrayList<Tab>();
        tabs.add(new Tab("name", Layout.ONECOLUMN));
        HashMap<String, Serializable> map = new HashMap<String, Serializable>();
        map.put("tabs", tabs);

        ReflectiveUpdater reflector = new ReflectiveUpdater();
        reflector.setProperties(sut, map);
View Full Code Here

     */
    @Test
    public void testUpdateAddNewTab()
    {
        Person ford = jpaPersonMapper.findById(fordPersonId);
        ford.getStartTabGroup().getTabs().add(new Tab("Foo", Layout.THREECOLUMN));
        jpaPersonMapper.flush();

        getEntityManager().clear();

        ford = jpaPersonMapper.findById(fordPersonId);
View Full Code Here

        // Load Ford, and rearrange his tabs
        Person ford = jpaPersonMapper.findByAccountId("fordp");
        TabGroup tabGroup = ford.getStartTabGroup();
        List<Tab> tabs = tabGroup.getTabs();

        Tab t2 = tabs.get(1);
        tabs.remove(t2);
        tabs.add(t2);

        // update all modified entities
        jpaPersonMapper.flush();
View Full Code Here

     */
    @Test
    public void testUpdateAddNewTab()
    {
        TabGroup tabGroup = jpaTabGroupMapper.findById(fordsStartPageId);
        tabGroup.getTabs().add(new Tab("Foo", Layout.THREECOLUMN));
        jpaTabGroupMapper.insert(tabGroup);

        getEntityManager().flush();
        getEntityManager().clear();

View Full Code Here

     */
    @Test
    public void testDeletedRecordRemainsAvailableinDBForUndelete() throws TabDeletionException
    {
        TabGroup fordsTabGroup = jpaTabGroupMapper.findById(fordsStartPageId);
        Tab fordTab1 = jpaTabMapper.findById(fordsFirstTabId);

        long pageId = fordsTabGroup.getId();
        long tabId = fordTab1.getId();
        int tabIndex = fordTab1.getTabIndex();

        // delete the first tab
        jpaTabGroupMapper.deleteTab(fordTab1);
        jpaTabGroupMapper.flush();

View Full Code Here

     */
    @Test
    public void testDeletingTabRemovesFromCollection() throws TabDeletionException
    {
        TabGroup tabGroup = jpaTabGroupMapper.findById(fordsStartPageId);
        Tab fordTab1 = jpaTabMapper.findById(fordsFirstTabId);

        // delete the first tab
        jpaTabGroupMapper.deleteTab(fordTab1);
        jpaTabGroupMapper.flush();

View Full Code Here

     */
    @Test
    public void testDeleteThenUndelete()
    {
        TabGroup tabGroup = jpaTabGroupMapper.findById(fordsStartPageId);
        Tab fordTab2 = jpaTabMapper.findById(fordsSecondTabId);

        final int expectedTabCountAfterDeletingAndUndeleting = 3;

        // delete the first tab
        try
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.Tab

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.