Examples of UnreadInAppNotificationCountDTO


Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

    @Test
    public void testExecute()
    {
        final Collection<Long> items = Arrays.asList(1L, 2L, 3L);
        final long userId = 77L;
        final UnreadInAppNotificationCountDTO newCount = new UnreadInAppNotificationCountDTO(4, 6);

        final InAppNotificationsByUserMapperRequest expectedRequest = new InAppNotificationsByUserMapperRequest(items,
                userId);

        context.checking(new Expectations()
View Full Code Here

Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

        // modify notifs
        modifyNotifsMapper.execute(new InAppNotificationsByUserMapperRequest(notifIds, userId));

        // Sync count in cache with count in database
        UnreadInAppNotificationCountDTO newCounts = syncMapper.execute(userId);

        return newCounts;
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

        int normalCount = ((Long) query.getSingleResult()).intValue();

        query = getEntityManager().createQuery(q).setParameter("userId", userId).setParameter("priority", true);
        int highCount = ((Long) query.getSingleResult()).intValue();

        return new UnreadInAppNotificationCountDTO(highCount, normalCount);
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

     * Tests execute method.
     */
    @Test
    public void testExecuteBoth()
    {
        UnreadInAppNotificationCountDTO result = sut.execute(42L);
        assertEquals(NORMAL_MSG, 1, result.getNormalPriority());
        assertEquals(HIGH_MSG, 2, result.getHighPriority());
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

     * Tests execute method.
     */
    @Test
    public void testExecuteOnlyNormal()
    {
        UnreadInAppNotificationCountDTO result = sut.execute(98L);
        assertEquals(NORMAL_MSG, 1, result.getNormalPriority());
        assertEquals(HIGH_MSG, 0, result.getHighPriority());
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

     * Tests execute method.
     */
    @Test
    public void testExecuteOnlyHigh()
    {
        UnreadInAppNotificationCountDTO result = sut.execute(99L);
        assertEquals(NORMAL_MSG, 0, result.getNormalPriority());
        assertEquals(HIGH_MSG, 1, result.getHighPriority());
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.UnreadInAppNotificationCountDTO

     * Tests execute method.
     */
    @Test
    public void testExecuteNeither()
    {
        UnreadInAppNotificationCountDTO result = sut.execute(4507L);
        assertEquals(NORMAL_MSG, 0, result.getNormalPriority());
        assertEquals(HIGH_MSG, 0, result.getHighPriority());
    }
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.