List of usage examples for com.rabbitmq.client ConnectionFactory getPort
public int getPort()
From source file:zipkin2.autoconfigure.collector.rabbitmq.ZipkinRabbitMQCollectorPropertiesTest.java
License:Apache License
@Test public void uriProperlyParsedAndIgnoresOtherProperties_whenUriSet() throws Exception { properties.setUri(URI.create("amqp://admin:admin@localhost:5678/myv")); properties.setAddresses(Collections.singletonList("will_not^work!")); properties.setUsername("bob"); properties.setPassword("letmein"); properties.setVirtualHost("drwho"); assertThat(properties.toBuilder()).extracting("connectionFactory").allSatisfy(object -> { ConnectionFactory connFactory = (ConnectionFactory) object; assertThat(connFactory.getHost()).isEqualTo("localhost"); assertThat(connFactory.getPort()).isEqualTo(5678); assertThat(connFactory.getUsername()).isEqualTo("admin"); assertThat(connFactory.getPassword()).isEqualTo("admin"); assertThat(connFactory.getVirtualHost()).isEqualTo("myv"); });/*from w w w . j a v a 2s . c om*/ }