Package com.consol.citrus.jms.actions

Examples of com.consol.citrus.jms.actions.PurgeJmsQueuesAction


    @Test
    public void testPurgeJmsQueuesActionParser() {
        assertActionCount(3);
        assertActionClassAndName(PurgeJmsQueuesAction.class, "purge-queue");
       
        PurgeJmsQueuesAction action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getReceiveTimeout());
        Assert.assertNotNull(action.getConnectionFactory());
        Assert.assertEquals(action.getQueues().size(), 0);
        Assert.assertEquals(action.getQueueNames().size(), 3);
        Assert.assertEquals(action.getQueueNames().get(0), "JMS.Queue.1");
        Assert.assertEquals(action.getQueueNames().get(1), "JMS.Queue.2");
        Assert.assertEquals(action.getQueueNames().get(2), "JMS.Queue.3");
       
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getReceiveTimeout());
        Assert.assertEquals(action.getReceiveTimeout(), 125);
        Assert.assertNotNull(action.getConnectionFactory());
        Assert.assertEquals(action.getQueues().size(), 0);
        Assert.assertEquals(action.getQueueNames().size(), 3);
        Assert.assertEquals(action.getQueueNames().get(0), "JMS.Queue.1");
        Assert.assertEquals(action.getQueueNames().get(1), "JMS.Queue.2");
        Assert.assertEquals(action.getQueueNames().get(2), "JMS.Queue.3");
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getQueues().size(), 1);
        Assert.assertEquals(action.getQueueNames().size(), 1);
        Assert.assertEquals(action.getQueueNames().get(0), "JMS.Queue.1");
    }
View Full Code Here


     *
     * @param connectionFactory
     * @return
     */
    public PurgeJMSQueuesActionDefinition purgeQueues(ConnectionFactory connectionFactory) {
        PurgeJmsQueuesAction action = new PurgeJmsQueuesAction();
        action.setConnectionFactory(connectionFactory);
        testCase.addTestAction(action);
        return new PurgeJMSQueuesActionDefinition(action);
    }
View Full Code Here

     * Purge queues using default connection factory.
     *
     * @return
     */
    public PurgeJMSQueuesActionDefinition purgeQueues() {
        PurgeJmsQueuesAction action = new PurgeJmsQueuesAction();
        action.setConnectionFactory(applicationContext.getBean("connectionFactory", ConnectionFactory.class));
        testCase.addTestAction(action);
        return new PurgeJMSQueuesActionDefinition(action);
    }
View Full Code Here

         
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), PurgeJmsQueuesAction.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "purge-queue");
         
        PurgeJmsQueuesAction action = (PurgeJmsQueuesAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getReceiveTimeout(), 2000);
        Assert.assertEquals(action.getSleepTime(), 1000);
        Assert.assertEquals(action.getConnectionFactory(), connectionFactory);
        Assert.assertEquals(action.getQueueNames().size(), 4);
        Assert.assertEquals(action.getQueueNames().toString(), "[q1, q2, q3, q4]");
        Assert.assertEquals(action.getQueues().size(), 0);
    }
View Full Code Here

        builder.execute();
         
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), PurgeJmsQueuesAction.class);
         
        PurgeJmsQueuesAction action = (PurgeJmsQueuesAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getReceiveTimeout(), 2000);
        Assert.assertEquals(action.getSleepTime(), 1000);
        Assert.assertEquals(action.getConnectionFactory(), connectionFactory);
        Assert.assertEquals(action.getQueueNames().size(), 0);
        Assert.assertEquals(action.getQueues().size(), 3);
        Assert.assertEquals(action.getQueues().toString(), "[" + queue1.toString() + ", " + queue2.toString() + ", " + queue3.toString() + "]");
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.jms.actions.PurgeJmsQueuesAction

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.