Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.NotificationFilterPreferenceDTO


     */
    public SetAllUserNotificationFilterPreferencesTest()
    {
        // Note: supply a different user id to confirm that the mapper uses the ID in the request and not the one in the
        // DTO
        dto1 = new NotificationFilterPreferenceDTO(OTHER_ID, "SMS", "POST_TO_PERSONAL_STREAM");
        dto2 = new NotificationFilterPreferenceDTO(OTHER_ID, "SMS", "COMMENT");
        dto3 = new NotificationFilterPreferenceDTO(OTHER_ID, "IM", "LIKE");
    }
View Full Code Here


        assertEquals(expectedList.size(), list.size());
        for (NotificationFilterPreferenceDTO item : expectedList)
        {
            // expect the DTO to contain the person ID from the main request and not the person ID from the individual
            // DTO
            NotificationFilterPreferenceDTO expected = new NotificationFilterPreferenceDTO(personId,
                    item.getNotifierType(), item.getNotificationCategory());
            assertTrue(Matchers.hasItem(equalInternally(expected)).matches(list));
        }
    }
View Full Code Here

     */
    @Test
    public void testExecuteNothingExists()
    {
        final long personId = 4507L;
        NotificationFilterPreferenceDTO dto = new NotificationFilterPreferenceDTO("SMS", "FOLLOW");
        SetUserNotificationFilterPreferencesRequest rqst = new SetUserNotificationFilterPreferencesRequest(personId,
                Collections.singletonList(dto));
        sut.execute(rqst);

        dto.setPersonId(personId);
        checkAgainstDb(personId, Collections.singletonList(dto));
    }
View Full Code Here

     */
    @Test
    public void testExecuteNoOverlap()
    {
        final long personId = 99L;
        NotificationFilterPreferenceDTO dto1 = new NotificationFilterPreferenceDTO("SMS", "FOLLOW");
        NotificationFilterPreferenceDTO dto2 = new NotificationFilterPreferenceDTO("IM", "FOLLOW");
        SetUserNotificationFilterPreferencesRequest rqst = new SetUserNotificationFilterPreferencesRequest(personId,
                Arrays.asList(dto1, dto2));
        sut.execute(rqst);

        dto1.setPersonId(personId);
        dto2.setPersonId(personId);
        checkAgainstDb(personId,
                Arrays.asList(dto1, dto2, new NotificationFilterPreferenceDTO(personId, "email", "COMMENT")));
    }
View Full Code Here

     */
    @Test
    public void testExecutePartialOverlap()
    {
        final long personId = 42L;
        NotificationFilterPreferenceDTO dto1 = new NotificationFilterPreferenceDTO("SMS", "FOLLOW");
        NotificationFilterPreferenceDTO dto2 = new NotificationFilterPreferenceDTO("email", "LIKE");
        SetUserNotificationFilterPreferencesRequest rqst = new SetUserNotificationFilterPreferencesRequest(personId,
                Arrays.asList(dto1, dto2));
        sut.execute(rqst);

        dto1.setPersonId(personId);
        dto2.setPersonId(personId);
        checkAgainstDb(personId,
                Arrays.asList(dto1, dto2, new NotificationFilterPreferenceDTO(personId, "email", "COMMENT")));
    }
View Full Code Here

     */
    @Test
    public void testExecuteCompleteOverlap()
    {
        final long personId = 42L;
        NotificationFilterPreferenceDTO dto1 = new NotificationFilterPreferenceDTO("email", "COMMENT");
        NotificationFilterPreferenceDTO dto2 = new NotificationFilterPreferenceDTO("email", "LIKE");
        SetUserNotificationFilterPreferencesRequest rqst = new SetUserNotificationFilterPreferencesRequest(personId,
                Arrays.asList(dto1, dto2));
        sut.execute(rqst);

        dto1.setPersonId(personId);
        dto2.setPersonId(personId);
        checkAgainstDb(personId, Arrays.asList(dto1, dto2));
    }
View Full Code Here

        // build list of preferences to set: one for each disableable notifier
        List<NotificationFilterPreferenceDTO> dtos = new ArrayList<NotificationFilterPreferenceDTO>();
        for (String notifier : notifierTypes.keySet())
        {
            dtos.add(new NotificationFilterPreferenceDTO(notifier, category));
        }

        prefsMapper.execute(new SetUserNotificationFilterPreferencesRequest(userId, dtos));

        return null;
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.NotificationFilterPreferenceDTO

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.