Package net.greghaines.jesque.meta.dao.impl.KeysDAORedisImpl

Examples of net.greghaines.jesque.meta.dao.impl.KeysDAORedisImpl.KeyDAOPoolWork.doWork()


        final KeyDAOPoolWork work = new KeyDAOPoolWork(key);
        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.STRING.toString()));
            oneOf(jedis).strlen(key); will(returnValue(size));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.STRING, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here


        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.STRING.toString()));
            oneOf(jedis).strlen(key); will(returnValue(size));
            oneOf(jedis).get(key); will(returnValue(value));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.STRING, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        final KeyDAOPoolWork work = new KeyDAOPoolWork(key);
        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.ZSET.toString()));
            oneOf(jedis).zcard(key); will(returnValue(size));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.ZSET, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.ZSET.toString()));
            oneOf(jedis).zcard(key); will(returnValue(size));
            oneOf(jedis).zrange(key, offset, offset + count); will(returnValue(value));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.ZSET, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        final KeyDAOPoolWork work = new KeyDAOPoolWork(key);
        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.SET.toString()));
            oneOf(jedis).scard(key); will(returnValue(size));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.SET, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.SET.toString()));
            oneOf(jedis).scard(key); will(returnValue(size));
            oneOf(jedis).smembers(key); will(returnValue(value));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.SET, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.SET.toString()));
            oneOf(jedis).scard(key); will(returnValue(size));
            oneOf(jedis).smembers(key); will(returnValue(value));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.SET, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.SET.toString()));
            oneOf(jedis).scard(key); will(returnValue(size));
            oneOf(jedis).smembers(key); will(returnValue(value));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.SET, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

        final KeyDAOPoolWork work = new KeyDAOPoolWork(key);
        this.mockCtx.checking(new Expectations(){{
            oneOf(jedis).type(key); will(returnValue(KeyType.HASH.toString()));
            oneOf(jedis).hlen(key); will(returnValue(size));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.HASH, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

            oneOf(jedis).type(key); will(returnValue(KeyType.HASH.toString()));
            oneOf(jedis).hlen(key); will(returnValue(size));
            oneOf(jedis).hkeys(key); will(returnValue(valueKeys));
            oneOf(jedis).hmget(key, "foo"); will(returnValue(valueValues));
        }});
        final KeyInfo keyInfo = work.doWork(this.jedis);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.HASH, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.