Package org.richfaces.photoalbum.model

Examples of org.richfaces.photoalbum.model.User


    }

    @Test(expected = PhotoAlbumException.class)
    public void isCommentNotAllowed() throws Exception {
        Image image = helper.getAllImages(em).get(0);
        User user = em.createQuery("select u from User u where u.id = :id", User.class).setParameter("id", (long) 1)
            .getSingleResult();

        image.setAllowComments(false);

        int originalSize = helper.getAllComments(em).size();
View Full Code Here


        Assert.assertFalse(ia.isImageWithThisPathExist(album2, path + path));
    }

    @Test
    public void areAllUserCommentsFound() throws Exception {
        User user = helper.getAllUsers(em).get(1);

        List<Comment> userComments = ia.findAllUserComments(user);

        Assert.assertEquals(4, userComments.size());
        for (Comment c : helper.getAllComments(em)) {
            if (c.getAuthor().getId() == user.getId()) {
                Assert.assertTrue(userComments.contains(c));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.photoalbum.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.