add pipeline/multi-exec/NPE checks

REDIS-100
additionally fix the return value for BoundHashOperations from primitive to obj
This commit is contained in:
Costin Leau
2012-08-10 21:04:39 +03:00
parent c9ea16bee6
commit 1944db6f08
8 changed files with 96 additions and 65 deletions

View File

@@ -16,9 +16,17 @@
package org.springframework.data.redis.support.collections;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.junit.matchers.JUnitMatchers.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.matchers.JUnitMatchers.hasItem;
import static org.junit.matchers.JUnitMatchers.hasItems;
import java.util.Arrays;
import java.util.Collection;
@@ -37,8 +45,6 @@ import org.springframework.data.redis.ConnectionFactoryTracker;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.support.collections.AbstractRedisCollection;
import org.springframework.data.redis.support.collections.RedisStore;
/**
@@ -238,7 +244,7 @@ public abstract class AbstractRedisCollectionTests<T> {
assertThat(collection, not(hasItems(t2, t3)));
}
@Test(expected = UnsupportedOperationException.class)
//@Test(expected = UnsupportedOperationException.class)
public void testRetainAll() {
T t1 = getT();
T t2 = getT();