Search in sources :

Example 1 with StubTopic

use of org.springframework.jms.StubTopic in project spring-framework by spring-projects.

the class DynamicDestinationResolverTests method resolveWithPubSubTopicSession.

@Test
public void resolveWithPubSubTopicSession() throws Exception {
    Topic expectedDestination = new StubTopic();
    TopicSession session = mock(TopicSession.class);
    given(session.createTopic(DESTINATION_NAME)).willReturn(expectedDestination);
    testResolveDestination(session, expectedDestination, true);
}
Also used : StubTopic(org.springframework.jms.StubTopic) TopicSession(javax.jms.TopicSession) Topic(javax.jms.Topic) StubTopic(org.springframework.jms.StubTopic) Test(org.junit.Test)

Example 2 with StubTopic

use of org.springframework.jms.StubTopic in project spring-framework by spring-projects.

the class DynamicDestinationResolverTests method resolveWithPubSubVanillaSession.

@Test
public void resolveWithPubSubVanillaSession() throws Exception {
    Topic expectedDestination = new StubTopic();
    Session session = mock(Session.class);
    given(session.createTopic(DESTINATION_NAME)).willReturn(expectedDestination);
    testResolveDestination(session, expectedDestination, true);
}
Also used : StubTopic(org.springframework.jms.StubTopic) Topic(javax.jms.Topic) StubTopic(org.springframework.jms.StubTopic) Session(javax.jms.Session) QueueSession(javax.jms.QueueSession) TopicSession(javax.jms.TopicSession) Test(org.junit.Test)

Aggregations

Topic (javax.jms.Topic)2 TopicSession (javax.jms.TopicSession)2 Test (org.junit.Test)2 StubTopic (org.springframework.jms.StubTopic)2 QueueSession (javax.jms.QueueSession)1 Session (javax.jms.Session)1