Package org.apache.qpid.disttest.controller

Examples of org.apache.qpid.disttest.controller.CommandForClient


        List<CommandForClient> commandList = new ArrayList<CommandForClient>();

        for (int i = 1 ; i <= numberOfCommands; i++)
        {
            commandList.add(new CommandForClient(clientName, new NoOpCommand()));
        }

        when(clientConfig.createCommands()).thenReturn(commandList);
        return clientConfig;
    }
View Full Code Here


public class ConfigTestUtils
{
    public static <C extends Command> void assertCommandForClient(final List<CommandForClient> commandsForClients, final int index, final String expectedRegisteredClientName, final Class<C> expectedCommandClass)
    {
        final CommandForClient commandForClient = commandsForClients.get(index);
        assertEquals(expectedRegisteredClientName, commandForClient.getClientName());
        final Command command = commandForClient.getCommand();
        assertTrue("Command " + index + " is of class " + command.getClass() + " but expecting " + expectedCommandClass,
                expectedCommandClass.isAssignableFrom(command.getClass()));
    }
View Full Code Here

        assertEquals(CLIENT_NAME, clientNames.get(0));
    }

    private TestConfig createTestConfig()
    {
        CommandForClient commandForClient1 = new CommandForClient(CLIENT_NAME, _noOpCommand);
        CommandForClient commandForClient2 = new CommandForClient(CLIENT_NAME, _createProducerCommand);
        CommandForClient commandForClient3 = new CommandForClient(CLIENT_NAME, _createConsumerCommand);

        TestConfig config = mock(TestConfig.class);
        when(config.createCommands()).thenReturn(Arrays.asList(commandForClient1, commandForClient2, commandForClient3));

        return config;
View Full Code Here

            String clientName = commandForClient.getClientName();
            Command command = commandForClient.getCommand();

            _iterationValue.applyToCommand(command);

            newCommands.add(new CommandForClient(clientName, command));
        }

        return newCommands;

    }
View Full Code Here

        List<CommandForClient> commandsForClient = new ArrayList<CommandForClient>();

        for (MessageProviderConfig messageProvider : _messageProviders)
        {
            Command command = messageProvider.createCommand();
            commandsForClient.add(new CommandForClient(_name, command));
        }
        for (ConnectionConfig connection : _connections)
        {
            List<Command> commands = connection.createCommands();
            for (Command command : commands)
            {
                commandsForClient.add(new CommandForClient(_name, command));
            }
        }
        return commandsForClient;
    }
View Full Code Here

public class ConfigTestUtils
{
    public static <C extends Command> void assertCommandForClient(final List<CommandForClient> commandsForClients, final int index, final String expectedRegisteredClientName, final Class<C> expectedCommandClass)
    {
        final CommandForClient commandForClient = commandsForClients.get(index);
        assertEquals(expectedRegisteredClientName, commandForClient.getClientName());
        final Command command = commandForClient.getCommand();
        assertTrue("Command " + index + " is of class " + command.getClass() + " but expecting " + expectedCommandClass,
                expectedCommandClass.isAssignableFrom(command.getClass()));
    }
View Full Code Here

        List<CommandForClient> commandList = new ArrayList<CommandForClient>();

        for (int i = 1 ; i <= numberOfCommands; i++)
        {
            commandList.add(new CommandForClient(clientName, new NoOpCommand()));
        }

        when(clientConfig.createCommands()).thenReturn(commandList);
        return clientConfig;
    }
View Full Code Here

        assertEquals(CLIENT_NAME, clientNames.get(0));
    }

    private TestConfig createTestConfig()
    {
        CommandForClient commandForClient1 = new CommandForClient(CLIENT_NAME, _noOpCommand);
        CommandForClient commandForClient2 = new CommandForClient(CLIENT_NAME, _createProducerCommand);
        CommandForClient commandForClient3 = new CommandForClient(CLIENT_NAME, _createConsumerCommand);

        TestConfig config = mock(TestConfig.class);
        when(config.createCommands()).thenReturn(Arrays.asList(commandForClient1, commandForClient2, commandForClient3));

        return config;
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.controller.CommandForClient

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.