Added commands operating on all kind of values

This commit is contained in:
Jonathan Leibiusky
2010-06-12 00:29:46 -03:00
parent 4ccb12cd75
commit def3f38de7
10 changed files with 467 additions and 52 deletions

View File

@@ -0,0 +1,36 @@
package redis.clients.jedis.tests.commands;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisException;
public class StringValuesCommandsTest extends Assert {
private Jedis jedis;
@Before
public void setUp() throws Exception {
jedis = new Jedis("localhost");
jedis.connect();
}
@After
public void tearDown() throws Exception {
jedis.flushDB();
jedis.disconnect();
}
@Test
public void setAndGet() throws JedisException {
String status = jedis.set("foo", "bar");
assertEquals("OK", status);
String value = jedis.get("foo");
assertEquals("bar", value);
}
}