Examples of MockTopic


Examples of ch.qos.logback.classic.net.mock.MockTopic

    appender.setProviderURL("url");
    appender.setInitialContextFactoryName(MockInitialContextFactory.class.getName());
   
    MockInitialContext mic = MockInitialContextFactory.getContext();
    mic.map.put(appender.tcfBindingName, new MockTopicConnectionFactory());
    mic.map.put(appender.topicBindingName, new MockTopic(appender.topicBindingName));

  }
View Full Code Here

Examples of com.mockobjects.jms.MockTopic

/**
* @version $Rev: 46019 $ $Date: 2004-09-14 03:56:06 -0600 (Tue, 14 Sep 2004) $
*/
public class TopicRequestorTest extends TestCase {
    public void testConstructorNullTopic() {
        MockTopic topic = new MockTopic();

        try {
            new TopicRequestor(null, topic);
            fail();
        } catch (JMSException ex) {
            fail("JMSException should not have been thrown.");
        } catch (NullPointerException ex) {
            // success.
        }

        topic.verify();
    }
View Full Code Here

Examples of com.mockobjects.jms.MockTopic

/**
* @version $Rev: 46019 $ $Date: 2004-09-14 04:56:06 -0500 (Tue, 14 Sep 2004) $
*/
public class TopicRequestorTest extends TestCase {
    public void testConstructorNullTopic() {
        MockTopic topic = new MockTopic();

        try {
            new TopicRequestor(null, topic);
            fail();
        } catch (JMSException ex) {
            fail("JMSException should not have been thrown.");
        } catch (NullPointerException ex) {
            // success.
        }

        topic.verify();
    }
View Full Code Here

Examples of com.mockobjects.jms.MockTopic

/**
* @version $Revision: 1.3 $ $Date: 2004/03/10 10:00:04 $
*/
public class TopicRequestorTest extends TestCase {
    public void testConstructorNullTopic() {
        MockTopic topic = new MockTopic();

        try {
            new TopicRequestor(null, topic);
            fail();
        } catch (JMSException ex) {
            fail("JMSException should not have been thrown.");
        } catch (NullPointerException ex) {
            // success.
        }

        topic.verify();
    }
View Full Code Here

Examples of com.mockobjects.jms.MockTopic

/**
* @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
*/
public class TopicRequestorTest extends TestCase {
    public void testConstructorNullTopic() {
        MockTopic topic = new MockTopic();

        try {
            new TopicRequestor(null, topic);
            fail();
        } catch (JMSException ex) {
            fail("JMSException should not have been thrown.");
        } catch (NullPointerException ex) {
            // success.
        }

        topic.verify();
    }
View Full Code Here

Examples of org.mockejb.jms.MockTopic

        final StatusConsoleListener l = new StatusConsoleListener(Level.ERROR);
        StatusLogger.getLogger().registerListener(l);
        MockContextFactory.setAsInitial();
        context = new InitialContext();
        context.rebind(FACTORY_NAME, new TopicConnectionFactoryImpl() );
        context.rebind(TOPIC_NAME, new MockTopic(TOPIC_NAME) );
        ((LoggerContext) LogManager.getContext()).reconfigure();
        receiver = new JMSTopicReceiver(FACTORY_NAME, TOPIC_NAME, null, null);
    }
View Full Code Here

Examples of org.mockejb.jms.MockTopic

    }
   
    public void executeSessionTopicSubscriberRetry(final boolean wsmq)
        throws Exception
    {
        final Topic topic = new MockTopic(TOPIC_NAME) ;
        final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
        final JmsSession session = pool.getSession() ;
        Assert.assertEquals("Session class", JmsSession.class, session.getClass()) ;
       
        final TopicSubscriber topicSubscriber = session.createDurableSubscriber(topic, "testSessionTopicSubscriberRetry") ;
View Full Code Here

Examples of org.mockejb.jms.MockTopic

    {
        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
        TransactionStrategy.setTransactionStrategy(new MockActiveTransactionStrategy()) ;
        try
        {
            final Topic topic = new MockTopic(TOPIC_NAME) ;
            final JmsConnectionPool pool = new JmsConnectionPool(getPoolEnv()) ;
            final JmsSession session = pool.getSession() ;
            Assert.assertEquals("Session class", JmsXASession.class, session.getClass()) ;
           
            final TopicSubscriber topicSubscriber = session.createDurableSubscriber(topic, "testSessionTopicSubscriberRetry") ;
View Full Code Here

Examples of org.mockejb.jms.MockTopic

   
    topicEl.setAttribute(NotifyJMS.ATT_DEST_NAME, topicName);
  }

  private MockTopic createAndBindTopic(String topicName) throws NamingException, NamingContextException {
    MockTopic mockTopic = new MockTopic(topicName);
   
    final Context ctx = NamingContextPool.getNamingContext(null) ;
    try
    {
        ctx.rebind(topicName, mockTopic);
View Full Code Here

Examples of org.mockejb.jms.MockTopic

    return mockQueue;
  }

  @SuppressWarnings("unused")
  private MockTopic createAndBindTopic(String topicName) throws NamingException, NamingContextException {
    MockTopic mockTopic = new MockTopic(topicName);
   
    final Context ctx = NamingContextPool.getNamingContext(null);
    try
    {
        ctx.rebind(topicName, mockTopic);
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.