Package org.springframework.jms

Examples of org.springframework.jms.StubQueue


    conControl.verify();
    cfControl.verify();
  }

  public void testTransactionCommitWithMessageProducer() throws JMSException {
    Destination dest = new StubQueue();

    MockControl cfControl = MockControl.createControl(ConnectionFactory.class);
    ConnectionFactory cf = (ConnectionFactory) cfControl.getMock();
    MockControl conControl = MockControl.createControl(Connection.class);
    Connection con = (Connection) conControl.getMock();
View Full Code Here


    mockSession.verify();
  }

  public void testResolveWithPointToPointQueueSession() throws Exception {

    Queue expectedDestination = new StubQueue();

    MockControl mockSession = MockControl.createControl(QueueSession.class);
    Session session = (Session) mockSession.getMock();
    session.createQueue(DESTINATION_NAME);
    mockSession.setReturnValue(expectedDestination);
View Full Code Here

    mockSession.verify();
  }

  public void testResolveWithPointToPointVanillaSession() throws Exception {

    Queue expectedDestination = new StubQueue();

    MockControl mockSession = MockControl.createControl(Session.class);
    Session session = (Session) mockSession.getMock();
    session.createQueue(DESTINATION_NAME);
    mockSession.setReturnValue(expectedDestination);
View Full Code Here

    assertEquals(3, spec.getMaxMessagesPerSessions());
    assertTrue(spec.isUseRAManagedTransaction());
  }

  public void testWebSphereResourceAdapterSetup() throws Exception {
    Destination destination = new StubQueue();

    MockControl control = MockControl.createControl(DestinationResolver.class);
    DestinationResolver destinationResolver = (DestinationResolver) control.getMock();

    destinationResolver.resolveDestinationName(null, "destinationname", false);
View Full Code Here

    given(session.createTopic(DESTINATION_NAME)).willReturn(expectedDestination);
    testResolveDestination(session, expectedDestination, true);
  }

  public void testResolveWithPointToPointQueueSession() throws Exception {
    Queue expectedDestination = new StubQueue();
    Session session = mock(QueueSession.class);
    given(session.createQueue(DESTINATION_NAME)).willReturn(expectedDestination);
    testResolveDestination(session, expectedDestination, false);
  }
View Full Code Here

    given(session.createQueue(DESTINATION_NAME)).willReturn(expectedDestination);
    testResolveDestination(session, expectedDestination, false);
  }

  public void testResolveWithPointToPointVanillaSession() throws Exception {
    Queue expectedDestination = new StubQueue();
    Session session = mock(Session.class);
    given(session.createQueue(DESTINATION_NAME)).willReturn(expectedDestination);
    testResolveDestination(session, expectedDestination, false);
  }
View Full Code Here

    verify(con, times(2)).close();
  }

  @Test
  public void testTransactionCommitWithMessageProducer() throws JMSException {
    Destination dest = new StubQueue();

    ConnectionFactory cf = mock(ConnectionFactory.class);
    Connection con = mock(Connection.class);
    Session session = mock(Session.class);
    MessageProducer producer = mock(MessageProducer.class);
View Full Code Here

    assertEquals(3, spec.getMaxMessagesPerSessions());
    assertTrue(spec.isUseRAManagedTransaction());
  }

  public void testWebSphereResourceAdapterSetup() throws Exception {
    Destination destination = new StubQueue();

    DestinationResolver destinationResolver = mock(DestinationResolver.class);
    given(destinationResolver.resolveDestinationName(null, "destinationname", false)).willReturn(destination);

    DefaultJmsActivationSpecFactory activationSpecFactory = new DefaultJmsActivationSpecFactory();
View Full Code Here

TOP

Related Classes of org.springframework.jms.StubQueue

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.