@Test public void testKryo() { Config config = createConfig(); config.setCodec(kryoCodec); redisson = Redisson.create(config); test(); }
@Test public void testSnappy() { Config config = createConfig(); config.setCodec(snappyCodec); redisson = Redisson.create(config); test(); }
@Test public void testJson() { Config config = createConfig(); config.setCodec(jsonCodec); redisson = Redisson.create(config); test(); }
@Test public void testMsgPack() { Config config = createConfig(); config.setCodec(msgPackCodec); redisson = Redisson.create(config); test(); }
@Test public void testLZ4() { Config config = createConfig(); config.setCodec(lz4Codec); redisson = Redisson.create(config); test(); }
@Test public void testCbor() { Config config = createConfig(); config.setCodec(cborCodec); redisson = Redisson.create(config); test(); }
@Test(expected = WriteRedisConnectionException.class) public void testSer() { Config config = new Config(); config.useSingleServer().setAddress("127.0.0.1:6379"); config.setCodec(new SerializationCodec()); RedissonClient r = Redisson.create(config); r.getMap("test").put("1", new Dummy()); }
@Test public void testListOfStrings() { Config config = createConfig(); config.setCodec(new JsonJacksonCodec()); redisson = Redisson.create(config); RMap<String, List<String>> map = redisson.getMap("list of strings", jsonListOfStringCodec); map.put("foo", new ArrayList<String>(Arrays.asList("bar"))); RMap<String, List<String>> map2 = redisson.getMap("list of strings", jsonListOfStringCodec); assertThat(map2).isEqualTo(map); }