Package com.zanox.rabbiteasy.publisher

Source Code of com.zanox.rabbiteasy.publisher.MessagePublisherIT

package com.zanox.rabbiteasy.publisher;

import com.zanox.rabbiteasy.SingleConnectionFactory;
import com.zanox.rabbiteasy.TestBrokerSetup;
import com.zanox.rabbiteasy.testing.BrokerAssert;
import org.junit.After;
import org.junit.Before;


public abstract class MessagePublisherIT {

    protected SingleConnectionFactory singleConnectionFactory;
    protected TestBrokerSetup brokerSetup;
    protected BrokerAssert brokerAssert;

    @Before
    public void beforeAll() throws Exception {
        brokerAssert = new BrokerAssert();
        brokerSetup = new TestBrokerSetup();
        brokerSetup.prepareSimpleTest();
        singleConnectionFactory = new SingleConnectionFactory();
        singleConnectionFactory.setHost(brokerSetup.getHost());
        singleConnectionFactory.setPort(brokerSetup.getPort());
    }

    @After
    public void after() throws Exception {
        brokerSetup.tearDown();
        singleConnectionFactory.close();
    }

}
TOP

Related Classes of com.zanox.rabbiteasy.publisher.MessagePublisherIT

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.