Package org.jboss.soa.esb.addressing.eprs

Examples of org.jboss.soa.esb.addressing.eprs.JMSEpr


  }
 
  @Test
  public void contstructor_props_and_selector() throws CourierException, URISyntaxException
  {
    JMSEpr jmsEpr = new JMSEpr( expectedDestinationType, expectedDestination , expectedConnectionFactory,
        nullEnvironment, expectedSelector);
   
    assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
    assertEquals( expectedSelector, jmsEpr.getMessageSelector() );
  }
View Full Code Here


  }
 
  @Test
  public void contstructor_persistent() throws CourierException, URISyntaxException
  {
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, PERSISTENT);
   
    assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
    assertEquals( ONE_ONE_PROTOCOL, jmsEpr.getVersion() );
    assertEquals( expectedSelector, jmsEpr.getMessageSelector() );
    assertEquals( PERSISTENT, jmsEpr.getPersistent() );
  }
View Full Code Here

  }
 
  @Test
  public void contstructor_non_persistent() throws CourierException, URISyntaxException
  {
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT);
   
    assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
    assertEquals( ONE_ONE_PROTOCOL, jmsEpr.getVersion() );
    assertEquals( expectedSelector, jmsEpr.getMessageSelector() );
    assertEquals( NON_PERSISTENT, jmsEpr.getPersistent() );
  }
View Full Code Here

  }
 
  @Test
  public void contstructor_acknowledeMode_default() throws CourierException, URISyntaxException
  {
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT);
   
    assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
    assertEquals( "Default acknowledemode should be AUTO_ACKNOWLEDGE", Session.AUTO_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
  }
View Full Code Here

 
  @Test
  public void contstructor_acknowledeMode_negative_ackmode_null() throws CourierException, URISyntaxException
  {
    final String acknowledgeModeStr = null;
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT, acknowledgeModeStr);
   
    assertEquals( Session.AUTO_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
  }
View Full Code Here

  }
 
  @Test
  public void contstructor_acknowledeMode_negative() throws CourierException, URISyntaxException
  {
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT, "BogusAckMode");
    assertEquals( Session.AUTO_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
  }
View Full Code Here

  }
 
  @Test
  public void contstructor_acknowledeMode_client_ack() throws CourierException, URISyntaxException
  {
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString());
   
    assertDefaults( jmsEpr.getDestinationName(), jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType() );
    assertEquals( Session.CLIENT_ACKNOWLEDGE, jmsEpr.getAcknowledgeMode() );
  }
View Full Code Here

   
    final Properties env = new Properties();
    env.put( Context.SECURITY_PRINCIPAL, principal );
    env.put( Context.SECURITY_CREDENTIALS, credential );
   
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        env, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString());
   
    assertEquals( principal, jmsEpr.getJndiEnvironment().getProperty( Context.SECURITY_PRINCIPAL ));
    assertEquals( credential, jmsEpr.getJndiEnvironment().getProperty( Context.SECURITY_CREDENTIALS ));
  }
View Full Code Here

  public void contstructor_with_jms_destination_security_negative() throws CourierException, URISyntaxException
  {
    final String username = null;
    final String password = null;
   
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString(),
        username,
        password);
   
    assertEquals( null, jmsEpr.getJMSSecurityPrincipal() );
    assertEquals( null, jmsEpr.getJMSSecurityCredential() );
  }
View Full Code Here

  public void contstructor_with_jms_destination_security() throws CourierException, URISyntaxException
  {
    final String username = "daniel";
    final String password = "password";
   
    JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination ,
        expectedConnectionFactory,
        nullEnvironment, expectedSelector, NON_PERSISTENT, AcknowledgeMode.CLIENT_ACKNOWLEDGE.toString(),
        username,
        password);
   
    assertEquals( username, jmsEpr.getJMSSecurityPrincipal() );
    assertEquals( password, jmsEpr.getJMSSecurityCredential() );
  }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.eprs.JMSEpr

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.