|
|
|
@ -16,14 +16,14 @@
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.autoconfigure.amqp;
|
|
|
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
|
import static org.junit.Assert.assertNull;
|
|
|
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tests for {@link RabbitProperties}.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @author Dave Syer
|
|
|
|
|
*/
|
|
|
|
|
public class RabbitPropertiesTests {
|
|
|
|
@ -50,28 +50,28 @@ public class RabbitPropertiesTests {
|
|
|
|
|
assertEquals(9999, this.properties.getPort());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testDefaultVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("/");
|
|
|
|
|
assertEquals("/", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
@Test
|
|
|
|
|
public void testDefaultVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("/");
|
|
|
|
|
assertEquals("/", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testemptyVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("");
|
|
|
|
|
assertEquals("/", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
@Test
|
|
|
|
|
public void testemptyVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("");
|
|
|
|
|
assertEquals("/", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testCustomVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("myvHost");
|
|
|
|
|
assertEquals("myvHost", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
@Test
|
|
|
|
|
public void testCustomVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("myvHost");
|
|
|
|
|
assertEquals("myvHost", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testCustomFalsyVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("/myvHost");
|
|
|
|
|
assertEquals("myvHost", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
@Test
|
|
|
|
|
public void testCustomFalsyVirtualHost() {
|
|
|
|
|
this.properties.setVirtualHost("/myvHost");
|
|
|
|
|
assertEquals("myvHost", this.properties.getVirtualHost());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|