Package org.mokai.persist.jdbc

Examples of org.mokai.persist.jdbc.MessageHandler.listMessages()


  @Test
  public void testListWithTypeAndDirectionCriteria() throws Exception {
    MessageHandler handler = mock(MessageHandler.class);
    when(handler.supportsDirection(any(Direction.class))).thenReturn(true);
    when(handler.listMessages(any(Connection.class), any(MessageCriteria.class)))
      .thenReturn(Collections.singleton(new Message()));

    DataSource dataSource = mockDataSource();
    JdbcMessageStore messageStore = createMessageStore(dataSource, handler);
View Full Code Here


  }

  @Test
  public void testListHandlerReturnsNull() throws Exception {
    MessageHandler handler = mock(MessageHandler.class);
    when(handler.listMessages(any(Connection.class), any(MessageCriteria.class)))
      .thenReturn(null);

    DataSource dataSource = mockDataSource();
    JdbcMessageStore messageStore = createMessageStore(dataSource, handler);
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.