Package net.greghaines.jesque

Examples of net.greghaines.jesque.ConfigBuilder


        this.mockCtx = new JUnit4Mockery();
        this.mockCtx.setImposteriser(ClassImposteriser.INSTANCE);
        this.mockCtx.setThreadingPolicy(new Synchroniser());
        this.pool = this.mockCtx.mock(Pool.class);
        this.jedis = this.mockCtx.mock(Jedis.class);
        this.keysDAO = new KeysDAORedisImpl(new ConfigBuilder().build(), this.pool);
    }
View Full Code Here


        new KeysDAORedisImpl(null, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testConstructor_NullPool() {
        final Config config = new ConfigBuilder().build();
        new KeysDAORedisImpl(config, null);
    }
View Full Code Here

    public void testCall() {
        final Collection<String> queues = Arrays.asList("foo", "bar");
        final Map<String,Class<?>> jobTypes = new LinkedHashMap<String,Class<?>>(1);
        jobTypes.put("test", TestAction.class);
        final MapBasedJobFactory jobFactory = new MapBasedJobFactory(jobTypes);
        final WorkerImplFactory factory = new WorkerImplFactory(new ConfigBuilder().build(), queues, jobFactory);
        final WorkerImpl worker = factory.call();
        Assert.assertNotNull(worker);
        Assert.assertEquals(queues.size(), worker.getQueues().size());
        Assert.assertTrue(queues.containsAll(worker.getQueues()));
        Assert.assertEquals(jobFactory, worker.getJobFactory());
View Full Code Here

        this.mockCtx = new JUnit4Mockery();
        this.mockCtx.setImposteriser(ClassImposteriser.INSTANCE);
        this.mockCtx.setThreadingPolicy(new Synchroniser());
        this.pool = this.mockCtx.mock(Pool.class);
        this.jedis = this.mockCtx.mock(Jedis.class);
        this.workerInfoDAO = new WorkerInfoDAORedisImpl(new ConfigBuilder().build(), this.pool);
    }
View Full Code Here

        new WorkerInfoDAORedisImpl(null, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testConstructor_NullPool() {
        final Config config = new ConfigBuilder().build();
        new WorkerInfoDAORedisImpl(config, null);
    }
View Full Code Here

        this.mockCtx = new JUnit4Mockery();
        this.mockCtx.setImposteriser(ClassImposteriser.INSTANCE);
        this.mockCtx.setThreadingPolicy(new Synchroniser());
        this.pool = this.mockCtx.mock(Pool.class);
        this.jedis = this.mockCtx.mock(Jedis.class);
        this.qInfoDAO = new QueueInfoDAORedisImpl(new ConfigBuilder().build(), this.pool);
    }
View Full Code Here

        new QueueInfoDAORedisImpl(null, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testConstructor_NullPool() {
        final Config config = new ConfigBuilder().build();
        new QueueInfoDAORedisImpl(config, null);
    }
View Full Code Here

        PoolUtils.createJedisPool(null);
    }
   
    @Test
    public void testCreateJedisPool() {
        final Config config = new ConfigBuilder().build();
        Assert.assertNotNull(PoolUtils.createJedisPool(config));
    }
View Full Code Here

        Assert.assertNotNull(PoolUtils.createJedisPool(config));
    }
   
    @Test(expected = IllegalArgumentException.class)
    public void testCreateJedisPool_NullPoolConfig() {
        final Config config = new ConfigBuilder().build();
        PoolUtils.createJedisPool(config, null);
    }
View Full Code Here

        this.mockCtx = new JUnit4Mockery();
        this.mockCtx.setImposteriser(ClassImposteriser.INSTANCE);
        this.mockCtx.setThreadingPolicy(new Synchroniser());
        this.pool = this.mockCtx.mock(Pool.class);
        this.jedis = this.mockCtx.mock(Jedis.class);
        this.failureDAO = new FailureDAORedisImpl(new ConfigBuilder().build(), this.pool);
    }
View Full Code Here

TOP

Related Classes of net.greghaines.jesque.ConfigBuilder

Copyright © 2018 www.massapicom. 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.