Examples of PageLayout


Examples of org.apache.rave.model.PageLayout

        assertThat(saved.isUserSelectable(), is(sameInstance(item1.isUserSelectable())));
    }

    @Test
    public void save_Null(){
        PageLayout item1 = new MongoDbPageLayout();
        item1.setCode("blah1");
        item1.setNumberOfRegions((long)123);
        item1.setRenderSequence((long)432);
        item1.setUserSelectable(true);
        MongoDbPageLayout toSave = new MongoDbPageLayout();
        expect(template.findOne(new Query(where("code").is(item1.getCode())), pageLayoutRepository.CLASS, CollectionNames.PAGE_LAYOUT_COLLECTION)).andReturn(toSave);
        template.save(isA(MongoDbPageLayout.class), eq(CollectionNames.PAGE_LAYOUT_COLLECTION));
        expectLastCall();
        replay(template);

        PageLayout saved = pageLayoutRepository.save(item1);

        assertThat(saved.getCode(), is(sameInstance(item1.getCode())));
        assertThat(saved.getNumberOfRegions(), is(sameInstance(item1.getNumberOfRegions())));
        assertThat(saved.getRenderSequence(), is(sameInstance(item1.getRenderSequence())));
        assertThat(saved.isUserSelectable(), is(sameInstance(item1.isUserSelectable())));
    }
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        assertThat(saved.isUserSelectable(), is(sameInstance(item1.isUserSelectable())));
    }

    @Test
    public void delete_Valid(){
        PageLayout item = new MongoDbPageLayout();
        item.setCode("123");
        expect(template.findOne(new Query(where("code").is(item.getCode())), pageLayoutRepository.CLASS, CollectionNames.PAGE_LAYOUT_COLLECTION)).andReturn((MongoDbPageLayout)item);

          template.remove(item);
        expectLastCall();
        replay(template);
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        template.setPageLayoutRepository(pageLayoutRepository);
    }

    @Test
    public void getPageLayout(){
        PageLayout p = new PageLayoutImpl();
         template.setPageLayoutCode("stinky");
        expect(pageLayoutRepository.getByPageLayoutCode("stinky")).andReturn(p);
        replay(pageLayoutRepository);

        assertThat(template.getPageLayout(), is(sameInstance(p)));
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        assertNotNull(user.getAuthorityCodes());
    }

    @Test
    public void getDefaultPageLayout_Valid(){
        PageLayout layout = new PageLayoutImpl();
        user.setDefaultPageLayoutCode("dingus");
        expect(pageLayoutRepository.getByPageLayoutCode("dingus")).andReturn(layout);
        replay(pageLayoutRepository);

        assertThat(user.getDefaultPageLayout(), is(sameInstance(layout)));
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        assertThat(user.getDefaultPageLayout(), is(sameInstance(layout)));
    }

    @Test
    public void getDefaultPageLayout_Null(){
        PageLayout layout = new PageLayoutImpl();
        user.setDefaultPageLayout(layout);
        assertThat(layout, is(sameInstance(user.getDefaultPageLayout())));
    }
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        assertFalse(pageLayout.equals(o));
    }

    @Test
    public void equals_Super(){
        PageLayout p = new MongoDbPageLayout();
        p.setCode("code");
        assertFalse(pageLayout.equals(p));
    }
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        }
    }

    @Override
    public PageLayout getDefaultPageLayout() {
        PageLayout layout = super.getDefaultPageLayout();
        if (layout == null) {
            layout = pageLayoutRepository.getByPageLayoutCode(super.getDefaultPageLayoutCode());
            super.setDefaultPageLayout(layout);
        }
        return layout;
View Full Code Here

Examples of org.apache.rave.model.PageLayout

        return pageLayoutRepository;
    }

    @Override
    public PageLayout getPageLayout() {
        PageLayout layout = super.getPageLayout();
        if(layout == null) {
            layout = pageLayoutRepository.getByPageLayoutCode(pageLayoutCode);
            super.setPageLayout(layout);
        }
        return layout;
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

        pageLayoutService = createMock(PageLayoutService.class);
        pageController = new PageController(pageService, userService, pageLayoutService);
        model = new ExtendedModelMap();
        request = new MockHttpServletRequest();

        validPageLayout = new PageLayout();
        validPageLayout.setEntityId(33L);
        validPageLayout.setCode(VALID_PAGE_LAYOUT_CODE);

        defaultPage = new Page(DEFAULT_PAGE_ID);
        defaultPage.setPageLayout(validPageLayout);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

  public void setup() {
    userService = createMock(UserService.class);
    pageService = createMock(PageService.class);
    profileController = new ProfileController(userService, pageService);

        validPageLayout = new PageLayout();
        validPageLayout.setEntityId(33L);
        validPageLayout.setCode(VALID_PAGE_LAYOUT_CODE);

        defaultPage = new Page(DEFAULT_PAGE_ID);
        defaultPage.setPageLayout(validPageLayout);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.