add getDB() which return the db number we are connected to

This commit is contained in:
Jonathan Leibiusky
2011-05-11 22:50:53 -03:00
parent cd3b50268e
commit 6ff9683537
3 changed files with 35 additions and 5 deletions

View File

@@ -343,6 +343,13 @@ public class AllKindOfValuesCommandsTest extends JedisCommandTestBase {
assertArrayEquals(bbar, jedis.get(bfoo));
}
@Test
public void getDB() {
assertEquals(0, jedis.getDB().longValue());
jedis.select(1);
assertEquals(1, jedis.getDB().longValue());
}
@Test
public void move() {
long status = jedis.move("foo", 1);