Package org.apache.qpid.disttest.message

Examples of org.apache.qpid.disttest.message.CreateConnectionCommand


        assertEquals("Unexpected number of test connections", 0, _clientJmsDelegate.getNoOfTestConnections());

        final RegisterClientCommand registration = _controllerQueue.getNext();
        createClientQueueProducer(registration);

        final CreateConnectionCommand createConnectionCommand = new CreateConnectionCommand();
        createConnectionCommand.setConnectionName("newTestConnection");
        createConnectionCommand.setConnectionFactoryName("connectionfactory");

        sendCommandToClient(createConnectionCommand);
        Response response = _controllerQueue.getNext();

        assertFalse("Response message should not have indicated an error", response.hasError());
View Full Code Here


        assertEquals("Unexpected number of test sessions", 0, _clientJmsDelegate.getNoOfTestSessions());

        final RegisterClientCommand registration = _controllerQueue.getNext();
        createClientQueueProducer(registration);

        final CreateConnectionCommand createConnectionCommand = new CreateConnectionCommand();
        createConnectionCommand.setConnectionName("newTestConnection");
        createConnectionCommand.setConnectionFactoryName("connectionfactory");

        sendCommandToClient(createConnectionCommand);
        Response response = _controllerQueue.getNext();
        assertFalse("Response message should not have indicated an error", response.hasError());
View Full Code Here

    private void createTestConnection(String connectionName) throws Exception
    {
        int initialNumberOfConnections = _clientJmsDelegate.getNoOfTestConnections();

        final CreateConnectionCommand createConnectionCommand = new CreateConnectionCommand();
        createConnectionCommand.setConnectionName(connectionName);
        createConnectionCommand.setConnectionFactoryName("connectionfactory");

        sendCommandAndValidateResponse(createConnectionCommand);

        int expectedNumberOfConnections = initialNumberOfConnections + 1;
View Full Code Here

    private TestInstance createTestInstanceWithConnection()
    {
        TestInstance testInstance = mock(TestInstance.class);

        List<CommandForClient> commands = Arrays.asList(
                new CommandForClient(CLIENT1_CONFIGURED_NAME, new CreateConnectionCommand("conn1", "factory")));

        when(testInstance.createCommands()).thenReturn(commands);

        return testInstance;
    }
View Full Code Here

        verify(_client).stop();
    }

    public void testCreateConnection() throws Exception
    {
        final CreateConnectionCommand command = new CreateConnectionCommand();
        _visitor.visit(command);
        verify(_delegate).createConnection(command);
    }
View Full Code Here

    public void testApplyPopulatedIterationValueToCommandWithoutMatchingProperties() throws Exception
    {
        IterationValue iterationValue = new IterationValue(_iterationValueMap);

        CreateConnectionCommand createConnectionCommand = mock(CreateConnectionCommand.class);
        iterationValue.applyToCommand(createConnectionCommand);

        verifyZeroInteractions(createConnectionCommand);
    }
View Full Code Here

        assertCommandEquals(commands, 0, CreateConnectionCommand.class);
        assertCommandEquals(commands, 1, NoOpCommand.class);
        assertCommandEquals(commands, 2, NoOpCommand.class);

        CreateConnectionCommand createConnectionCommand = getCommand(commands, 0);
        assertEquals(CONNECTION_NAME, createConnectionCommand.getConnectionName());
        assertEquals(CONNECTION_FACTORY_NAME, createConnectionCommand.getConnectionFactoryName());
    }
View Full Code Here

        return commands;
    }

    private CreateConnectionCommand createCommand()
    {
        CreateConnectionCommand command = new CreateConnectionCommand();
        command.setConnectionName(_name);
        command.setConnectionFactoryName(_factory);
        return command;
    }
View Full Code Here

        verify(_client).stop();
    }

    public void testCreateConnection() throws Exception
    {
        final CreateConnectionCommand command = new CreateConnectionCommand();
        _visitor.visit(command);
        verify(_delegate).createConnection(command);
    }
View Full Code Here

    private TestInstance createTestInstanceWithConnection()
    {
        TestInstance testInstance = mock(TestInstance.class);

        List<CommandForClient> commands = Arrays.asList(
                new CommandForClient(CLIENT1_CONFIGURED_NAME, new CreateConnectionCommand("conn1", "factory")));

        when(testInstance.createCommands()).thenReturn(commands);

        return testInstance;
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.message.CreateConnectionCommand

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.