Package in.partake.model

Examples of in.partake.model.UserTicketEx


    }

    @Test
    public void sortAllSameValues() {
        List<UserTicketEx> list = Arrays.asList(new UserTicketEx[] {
                new UserTicketEx(new UserTicket("id1", "userID", new UUID(0, 0), "eventId", "comment", null, null, null, null, new DateTime(0), new DateTime(0), null), user),
                new UserTicketEx(new UserTicket("id2", "userID", new UUID(0, 0), "eventId", "comment", null, null, null, null, new DateTime(0), new DateTime(0), null), user),
        });

        Collections.sort(list, comparator);
        Assert.assertTrue(list.get(0).getAppliedAt().compareTo(list.get(1).getAppliedAt()) == 0);
        Assert.assertTrue(list.get(0).getUserId().compareTo(list.get(1).getUserId()) == 0);
View Full Code Here


    }

    @Test
    public void sortParicipationAndNull() {
        List<UserTicketEx> list = Arrays.asList(new UserTicketEx[] {
                new UserTicketEx(new UserTicket("id", "userID", new UUID(0, 0), "eventId", "comment", null, null, null, null, new DateTime(0), new DateTime(0), new DateTime(0)), user),
                null
        });

        Collections.sort(list, comparator);
        Assert.assertNull(list.get(0));
View Full Code Here

    // throwing NullPointerException is needed? really?
    @Test(expected = NullPointerException.class)
    public void sortNullId() {
        List<UserTicketEx> list = Arrays.asList(new UserTicketEx[] {
                new UserTicketEx(new UserTicket(null, null, null, null, "comment", ParticipationStatus.CANCELLED, ModificationStatus.CHANGED, null, null, null, new DateTime(0), null), user),
                new UserTicketEx(new UserTicket(null, null, null, null, "comment", ParticipationStatus.CANCELLED, ModificationStatus.CHANGED, null, null, null, new DateTime(0), null), user),
        });
        Collections.sort(list, comparator);
    }
View Full Code Here

        List<UserTicketEx> ps = new ArrayList<UserTicketEx>();
        for (UserTicket p : daos.getEnrollmentAccess().findByTicketId(con, ticket.getId(), 0, Integer.MAX_VALUE)) {
            if (p == null) { continue; }
            UserEx user = UserDAOFacade.getUserEx(con, daos, p.getUserId());
            if (user == null) { continue; }
            UserTicketEx pe = new UserTicketEx(p, user);
            pe.freeze();
            ps.add(pe);
        }

        Collections.sort(ps, UserTicketEx.getPriorityBasedComparator());
        return ps;
View Full Code Here

TOP

Related Classes of in.partake.model.UserTicketEx

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.