aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2006-11-16 14:15:00 +0000
committerDamian Minkov <damencho@jitsi.org>2006-11-16 14:15:00 +0000
commit8583bf5e447b819dc0f0880968b63a9b25047c05 (patch)
treedb48c214f28d684077520dce34990ed9f0e9ab41 /test
parente1987ea9bf1129d70289c47bf8038eb1bc62c625 (diff)
downloadjitsi-8583bf5e447b819dc0f0880968b63a9b25047c05.zip
jitsi-8583bf5e447b819dc0f0880968b63a9b25047c05.tar.gz
jitsi-8583bf5e447b819dc0f0880968b63a9b25047c05.tar.bz2
Add new finders in history and message history
Diffstat (limited to 'test')
-rw-r--r--test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java b/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java
index ed07fda..bf83d38 100644
--- a/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java
+++ b/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java
@@ -337,6 +337,35 @@ public class TestMsgHistoryService
assertTrue("Message no found",
msgs.contains(messagesToSend[4].getContent()));
+ /**
+ * Must return exactly the 3 messages after controlDate1
+ */
+ rs = msgHistoryService.getFirstMessagesAfter(testMetaContact, controlDate1, 3);
+
+ assertTrue("Nothing found 9", !rs.isEmpty());
+ msgs = getMessages(rs);
+ assertEquals("Messages must be 3", msgs.size(), 3);
+ assertTrue("Message no found",
+ msgs.contains(messagesToSend[1].getContent()));
+ assertTrue("Message no found",
+ msgs.contains(messagesToSend[2].getContent()));
+ assertTrue("Message no found",
+ msgs.contains(messagesToSend[3].getContent()));
+
+ /**
+ * Must return exactly the 3 messages before controlDate2
+ */
+ rs = msgHistoryService.getLastMessagesBefore(testMetaContact, controlDate2, 3);
+
+ assertTrue("Nothing found 10", !rs.isEmpty());
+ msgs = getMessages(rs);
+ assertEquals("Messages must be 3", msgs.size(), 3);
+ assertTrue("Message no found",
+ msgs.contains(messagesToSend[0].getContent()));
+ assertTrue("Message no found",
+ msgs.contains(messagesToSend[1].getContent()));
+ assertTrue("Message no found",
+ msgs.contains(messagesToSend[2].getContent()));
}
/**