Package org.springframework.core.env

Examples of org.springframework.core.env.StandardEnvironment.addActiveProfile()


  @Test @Ignore
  public void testAdminFailsWithMismatchedQueue() throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
    context.setConfigLocation("org/springframework/amqp/rabbit/config/MismatchedQueueDeclarationTests-context.xml");
    StandardEnvironment env = new StandardEnvironment();
    env.addActiveProfile("basicAdmin");
    env.addActiveProfile("basic");
    context.setEnvironment(env);
    context.refresh();
    context.getBean(CachingConnectionFactory.class).createConnection();
    context.destroy();
View Full Code Here


  public void testAdminFailsWithMismatchedQueue() throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
    context.setConfigLocation("org/springframework/amqp/rabbit/config/MismatchedQueueDeclarationTests-context.xml");
    StandardEnvironment env = new StandardEnvironment();
    env.addActiveProfile("basicAdmin");
    env.addActiveProfile("basic");
    context.setEnvironment(env);
    context.refresh();
    context.getBean(CachingConnectionFactory.class).createConnection();
    context.destroy();
    Channel channel = this.connectionFactory.createConnection().createChannel(false);
View Full Code Here

    this.admin.deleteQueue("mismatch.bar");
    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
    assertNull(this.admin.getQueueProperties("mismatch.bar"));

    env = new StandardEnvironment();
    env.addActiveProfile("basicAdmin");
    env.addActiveProfile("ttl");
    context.setEnvironment(env);
    context.refresh();
    channel = this.connectionFactory.createConnection().createChannel(false);
    try {
View Full Code Here

    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
    assertNull(this.admin.getQueueProperties("mismatch.bar"));

    env = new StandardEnvironment();
    env.addActiveProfile("basicAdmin");
    env.addActiveProfile("ttl");
    context.setEnvironment(env);
    context.refresh();
    channel = this.connectionFactory.createConnection().createChannel(false);
    try {
      context.getBean(CachingConnectionFactory.class).createConnection();
View Full Code Here

  @Test
  public void testAdminSkipsMismatchedQueue() throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
    context.setConfigLocation("org/springframework/amqp/rabbit/config/MismatchedQueueDeclarationTests-context.xml");
    StandardEnvironment env = new StandardEnvironment();
    env.addActiveProfile("advancedAdmin");
    env.addActiveProfile("basic");
    context.setEnvironment(env);
    context.refresh();
    context.getBean(CachingConnectionFactory.class).createConnection();
    context.destroy();
View Full Code Here

  public void testAdminSkipsMismatchedQueue() throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
    context.setConfigLocation("org/springframework/amqp/rabbit/config/MismatchedQueueDeclarationTests-context.xml");
    StandardEnvironment env = new StandardEnvironment();
    env.addActiveProfile("advancedAdmin");
    env.addActiveProfile("basic");
    context.setEnvironment(env);
    context.refresh();
    context.getBean(CachingConnectionFactory.class).createConnection();
    context.destroy();
    Channel channel = this.connectionFactory.createConnection().createChannel(false);
View Full Code Here

    this.admin.deleteQueue("mismatch.bar");
    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
    assertNull(this.admin.getQueueProperties("mismatch.bar"));

    env = new StandardEnvironment();
    env.addActiveProfile("advancedAdmin");
    env.addActiveProfile("ttl");
    context.setEnvironment(env);
    context.refresh();
    channel = this.connectionFactory.createConnection().createChannel(false);
    context.getBean(CachingConnectionFactory.class).createConnection();
View Full Code Here

    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
    assertNull(this.admin.getQueueProperties("mismatch.bar"));

    env = new StandardEnvironment();
    env.addActiveProfile("advancedAdmin");
    env.addActiveProfile("ttl");
    context.setEnvironment(env);
    context.refresh();
    channel = this.connectionFactory.createConnection().createChannel(false);
    context.getBean(CachingConnectionFactory.class).createConnection();
    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.