srt / openarchive

Open Archive XEP-0136 Plugin for Openfire
16 stars 10 forks source link

Retrieving conversation splits with JID if it has a resource attached #3

Closed dinoboy197 closed 12 years ago

dinoboy197 commented 12 years ago

This branch is a fix for the issue2 (https://github.com/srt/openarchive/issues/2) that was filed yesterday.

Changes: 1) Added mockito / powermockito for easier unit testing with mocks. This requires compiling at Java 1.5 level. 2) getCollection() method in JdbcPersistenceManager splits withJid into bare JID and resource (if present) and creates query to correctly set where predicates on these fields. 3) Added tests to verify correct querying with a withJID with and without resource attached.

I verified that this all works correctly with Openfire 3.6.4.

srt commented 12 years ago

Great, thanks for your contribution!