Package com.streamreduce.core.service

Examples of com.streamreduce.core.service.MessageServiceImpl


        SobaMessageDAO sobaMessageDAO = mock(SobaMessageDAO.class);
        when(sobaMessageDAO.getMessagesFromInbox(any(User.class),anyLong(),anyLong(),anyInt(),
                anyBoolean(), anyString(), anyListOf(String.class),anyString(),anyBoolean()))
                .thenReturn(null);

        MessageServiceImpl messageService = new MessageServiceImpl();
        ReflectionTestUtils.setField(messageService,"sobaMessageDAO",sobaMessageDAO);

        //Now verify that MessageServiceImpl normalizes the hashtags passing them into the DAO.
        List<String> passedInHashtags = ImmutableList.of("foo","#bar","baz");
        List<String> expectedHashTags = ImmutableList.of("#foo","#bar","#baz");
        messageService.getAllMessages(null,null,null,5,true,null, passedInHashtags,null,false);
        verify(sobaMessageDAO).getMessagesFromInbox(null, null, null, 5, true, null, expectedHashTags, null,false);
    }
View Full Code Here


        verify(sobaMessageDAO).getMessagesFromInbox(null, null, null, 5, true, null, expectedHashTags, null,false);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSendNodebellyMessage_NullEvent() {
        MessageServiceImpl messageService = new MessageServiceImpl();
        messageService.sendNodebellyInsightMessage(null,System.currentTimeMillis(),new HashSet<String>());
    }
View Full Code Here

        messageService.sendNodebellyInsightMessage(null,System.currentTimeMillis(),new HashSet<String>());
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSendNodebellyMessage_NullDate() {
        MessageServiceImpl messageService = new MessageServiceImpl();
        messageService.sendNodebellyInsightMessage(mock(Event.class),null,new HashSet<String>());
    }
View Full Code Here

TOP

Related Classes of com.streamreduce.core.service.MessageServiceImpl

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.