add warning regarding RedisTemplate initialization

DATAREDIS-112
This commit is contained in:
Costin Leau
2013-02-05 18:32:04 +02:00
parent 3be1d7d637
commit b869bc7136
2 changed files with 14 additions and 0 deletions

View File

@@ -57,6 +57,13 @@ public class TemplateTest {
return CollectionTestParams.testParams();
}
@Test(expected = IllegalArgumentException.class)
public void testTemplateNotInitialized() throws Exception {
RedisTemplate tpl = new RedisTemplate();
tpl.setConnectionFactory(template.getConnectionFactory());
tpl.exec();
}
@Test
public void testKeys() throws Exception {
assertTrue(template.keys("*") != null);