Added transactions support

This commit is contained in:
Jonathan Leibiusky
2010-07-05 00:35:47 -03:00
parent cc26791c69
commit 81cc2cec8e
11 changed files with 1196 additions and 192 deletions

View File

@@ -0,0 +1,38 @@
package redis.clients.jedis.tests;
import java.io.IOException;
import java.net.UnknownHostException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import redis.clients.jedis.Connection;
public class ConnectionTest extends Assert {
private Connection client;
@Before
public void setUp() throws Exception {
client = new Connection();
}
@After
public void tearDown() throws Exception {
client.disconnect();
}
@Test(expected = UnknownHostException.class)
public void checkUnkownHost() throws UnknownHostException, IOException {
client.setHost("someunknownhost");
client.connect();
}
@Test(expected = IOException.class)
public void checkWrongPort() throws UnknownHostException, IOException {
client.setHost("localhost");
client.setPort(55665);
client.connect();
}
}