Examples of CreateNotificationsRequest


Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

     */
    @Test
    public void testExecuteNoTranslator()
    {
        TaskHandlerActionContext<ActionContext> ac = TestContextCreator
                .createTaskHandlerAsyncContext(new CreateNotificationsRequest(RequestType.LIKE, 0));
        sut.execute(ac);

        context.assertIsSatisfied();
        assertTrue(ac.getUserActionRequests().isEmpty());
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

     * Tests execute.
     */
    @Test
    public void testExecuteNoBatch()
    {
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(null));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

     * Tests execute.
     */
    @Test
    public void testExecuteBatchNoRecipients()
    {
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch()));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

    @Test
    public void testExecuteBulkFilterReject()
    {
        bulkFilters.put("EMAIL", Collections.singletonList(bulkFilter));

        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch(NotificationType.PASS_THROUGH, 1L)));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

     */
    @Test
    public void testExecuteShortCircuit1() throws Exception
    {
        final List<Long> recips = Collections.singletonList(1L);
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch(NotificationType.PASS_THROUGH, 1L)));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

    public void testExecuteShortCircuit2() throws Exception
    {
        recipientFilters.put("EMAIL", Collections.EMPTY_LIST);

        final List<Long> recips = Arrays.asList(1L, 2L, 3L);
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch(NotificationType.LIKE_ACTIVITY, recips)));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

    public void testExecuteSomeFiltering() throws Exception
    {
        recipientFilters.put("EMAIL", Collections.singletonList(recipientFilter));

        final List<Long> recips = Arrays.asList(1L, 2L, 3L);
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch(NotificationType.LIKE_ACTIVITY, recips)));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

    public void testExecutePrefFilterAll() throws Exception
    {
        recipientFilters.put("EMAIL", Collections.singletonList(recipientFilter));

        final List<Long> recips = Arrays.asList(1L, 2L);
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch(NotificationType.LIKE_ACTIVITY, recips)));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

     */
    @Test
    public void testExecuteCoverageNotifierException() throws Exception
    {
        final List<Long> recips = Collections.singletonList(1L);
        final CreateNotificationsRequest request = new CreateNotificationsRequest(RequestType.COMMENT, 0);
        context.checking(new Expectations()
        {
            {
                oneOf(translator).translate(request);
                will(returnValue(new NotificationBatch(NotificationType.PASS_THROUGH, 1L)));
View Full Code Here

Examples of org.eurekastreams.server.action.request.notification.CreateNotificationsRequest

        assertEquals(2, userActionRequests.size());

        assertEquals("Second request has wrong key", "createNotificationsAction", userActionRequests.get(1)
                .getActionKey());
        CreateNotificationsRequest request2 = new TargetEntityNotificationsRequest(RequestType.REQUEST_NEW_GROUP,
                personId, id);
        assertTrue("Second request has wrong content", IsEqualInternally.areEqualInternally(request2,
                userActionRequests.get(1).getParams()));
    }
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.