Class EmbeddedActiveMQResource

java.lang.Object
org.junit.rules.ExternalResource
org.apache.activemq.artemis.junit.EmbeddedActiveMQResource
All Implemented Interfaces:
EmbeddedActiveMQOperations, org.junit.rules.TestRule

public class EmbeddedActiveMQResource extends org.junit.rules.ExternalResource implements EmbeddedActiveMQOperations
A JUnit Rule that embeds an ActiveMQ Artemis server into a test. This JUnit Rule is designed to simplify using embedded servers in unit tests. Adding the rule to a test will startup an embedded server, which can then be used by client applications.
public class SimpleTest {
    @Rule
    public EmbeddedActiveMQResource server = new EmbeddedActiveMQResource();

    @Test
    public void testSomething() throws Exception {
        // Use the embedded server here
    }
}