From 869b5bcdb9de8516b80808aea35297adef9c619f Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Mon, 4 Sep 2006 11:34:20 +0000 Subject: [PATCH] Added tests for case in/sensitive search --- .../slick/msghistory/TestMsgHistoryService.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java b/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java index 134c6d684..ed07fda7b 100644 --- a/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java +++ b/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java @@ -231,6 +231,21 @@ public void readRecords() assertTrue("Messages too few - findByKeyword", msgs.size() >= 5); + /** + * Will test case sernsitive and insensitive search + */ + rs = msgHistoryService.findByKeyword(testMetaContact, "Test", false); + + assertTrue("Nothing found findByKeyword caseINsensitive search", !rs.isEmpty()); + + msgs = getMessages(rs); + + assertTrue("Messages too few - findByKeyword", msgs.size() >= 5); + + rs = msgHistoryService.findByKeyword(testMetaContact, "Test", true); + + assertFalse("Something found by findByKeyword casesensitive search", !rs.isEmpty()); + /** * This must match also many messages, as tests are run many times * but the minimum is 3