Package org.apache.rave.portal.model

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


        assertThat(user, is(nullValue()));
    }

    @Test
    public void getByUserEmail_valid() {
        User user = repository.getByUserEmail(USER_EMAIL);
        assertThat(user, CoreMatchers.notNullValue());
        assertThat(user.getEntityId(), is(equalTo(USER_ID)));
        assertThat(user.getPassword(), is(equalTo(HASHED_SALTED_PASSWORD)));
        assertThat(user.isAccountNonExpired(), is(true));
      assertThat(user.getEmail(), is(equalTo(USER_EMAIL)));
    }
View Full Code Here


        originalRegion.setRegionWidgets(new ArrayList<RegionWidget>());
        originalRegion.getRegionWidgets().add(new RegionWidget(4L, validWidget, targetRegion, 0));
        originalRegion.getRegionWidgets().add(new RegionWidget(5L, validWidget, targetRegion, 1));
        originalRegion.getRegionWidgets().add(new RegionWidget(6L, validWidget, targetRegion, 2));
       
        user = new User();
        user.setEntityId(1L);
        user.setUsername("acarlucci");
       
        pageLayout = new PageLayout();
        pageLayout.setEntityId(1L);
View Full Code Here

    }

    @Test
    public void createCategory_valid(){
        Model model = new ExtendedModelMap();
        User user = new UserImpl();
        String categoryText = "Social";
        CategoryImpl category = new CategoryImpl();
        category.setText(categoryText);
        SessionStatus sessionStatus = createMock(SessionStatus.class);
        expect(userService.getAuthenticatedUser()).andReturn(user).once();
View Full Code Here

    @Test(expected = SecurityException.class)
    public void createCategory_invalidToken(){
        Model model = new ExtendedModelMap();
        String invalidToken =  AdminControllerUtil.generateSessionToken();
        User user = new UserImpl();
        String categoryText = "Social";
        CategoryImpl category = new CategoryImpl();
        category.setText(categoryText);
        SessionStatus sessionStatus = createMock(SessionStatus.class);
        expect(userService.getAuthenticatedUser()).andReturn(user).once();
View Full Code Here

    }

    @Test
    public void createCategory_invalidValidRequest_emptyText(){
        Model model = new ExtendedModelMap();
        User user = new UserImpl();
        String categoryText = "";
        CategoryImpl category = new CategoryImpl();
        category.setText(categoryText);
        SessionStatus sessionStatus = createMock(SessionStatus.class);
        expect(userService.getAuthenticatedUser()).andReturn(user).once();
View Full Code Here

    }

    @Test
    public void updateCategory_valid(){
        Model model = new ExtendedModelMap();
        User user = new UserImpl();
        long id = 1L;
        String categoryText = "Social";
        CategoryImpl category = new CategoryImpl();
        category.setCreatedUser(user);
        category.setText(categoryText);
View Full Code Here

    }

    @Test(expected = SecurityException.class)
    public void updateCategory_invalidToken(){
        Model model = new ExtendedModelMap();
        User user = new UserImpl();
        long id = 1L;
        String categoryText = "Social";
        String invalidToken = AdminControllerUtil.generateSessionToken();
        CategoryImpl category = new CategoryImpl();
        category.setCreatedUser(user);
View Full Code Here

    }

    @Test
    public void updateCategory_invalidValidRequest_emptyText(){
        Model model = new ExtendedModelMap();
        User user = new UserImpl();

        long id = 1L;
        String categoryText = "";
        CategoryImpl category = new CategoryImpl();
        category.setCreatedUser(user);
View Full Code Here

    @Test
    public void updateCategory_invalidValidRequest_nullUser(){
        Model model = new ExtendedModelMap();
        long id = 1L;
        User user = new UserImpl();
        String categoryText = "Social";
        CategoryImpl category = new CategoryImpl();
        category.setCreatedUser(user);
        category.setText(categoryText);
        category.setId(id);
View Full Code Here

    }

    @Test
    public void updateCategory_invalidValidRequest_nullWidgetToUpdate(){
        Model model = new ExtendedModelMap();
        User user = new UserImpl();
        long id = 1L;
        String categoryText = "Social";
        CategoryImpl category = new CategoryImpl();
        category.setCreatedUser(user);
        category.setText(categoryText);
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.User

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.