Package org.jtalks.jcommune.model.dto

Examples of org.jtalks.jcommune.model.dto.PageRequest


        int pageCount = 3;
        int pageSize = totalSize / pageCount;
        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
        PageRequest pageRequest = new PageRequest("0", pageSize);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllFromUser(userFrom, pageRequest);

        assertEquals(messagePage.getNumber(), 1, "Incorrect page number");
View Full Code Here


        int pageCount = 3;
        int pageSize = totalSize / pageCount;
        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
        PageRequest pageRequest = new PageRequest("1000",
                pageSize);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllFromUser(userFrom, pageRequest);
View Full Code Here

        int pageCount = 3;
        int pageSize = totalSize / pageCount;
        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
        PageRequest pageRequest = new PageRequest("1000",
                pageSize);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllFromUser(userFrom, pageRequest);
View Full Code Here

        int pageCount = 3;
        int pageSize = totalSize / pageCount;
        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
        PageRequest pageRequest = new PageRequest("1000",
                pageSize);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllFromUser(userFrom, pageRequest);
View Full Code Here

    public void testGetAllFromUserOneMessageCaseMessageCountOnOnePageIsCorrect() {
        int pageSize = 25;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1" +
                "@mail.com");
        PageRequest pageRequest = new PageRequest("1", pageSize);
        PersistedObjectsFactory.createAndSaveMessage(PrivateMessageStatus.SENT, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllFromUser(userFrom, pageRequest);

        assertEquals(messagePage.getContent().size(), 1, "Incorrect count of message in one page.");
View Full Code Here

    public void testGetAllFromUserOneMessageCasePageCountIsCorrect() {
        int pageCount = 1;
        int pageSize = 25;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");
        PageRequest pageRequest = new PageRequest("1", pageSize);
        PersistedObjectsFactory.createAndSaveMessage(PrivateMessageStatus.SENT, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllFromUser(userFrom, pageRequest);

        assertEquals(messagePage.getTotalPages(), pageCount, "Incorrect count of pages.");
View Full Code Here

        int itemsOnPage = totalSize / pageCount;
        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");

        PageRequest pageRequest = new PageRequest("1",
                itemsOnPage);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllForUser(userTo, pageRequest);
        for (PrivateMessage message : messagePage.getContent()) {
View Full Code Here

        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom",
                "mail1@mail.com");

        PageRequest pageRequest = new PageRequest("1",
                itemsOnPage);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllForUser(userTo, pageRequest);
View Full Code Here

        int itemsOnPage = totalSize / pageCount;
        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail.com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");

        PageRequest pageRequest = new PageRequest("1",
                itemsOnPage);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllForUser(userTo, pageRequest);
View Full Code Here

        int messageCount = 50;
        JCUser userTo = PersistedObjectsFactory.getUser("UserTo", "mail2@mail" +
                ".com");
        JCUser userFrom = PersistedObjectsFactory.getUser("UserFrom", "mail1@mail.com");

        PageRequest pageRequest = new PageRequest("1",
                itemsOnPage);
        PersistedObjectsFactory.preparePrivateMessages(messageCount, userTo, userFrom);

        Page<PrivateMessage> messagePage = dao.getAllForUser(userTo, pageRequest);
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.model.dto.PageRequest

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.