sullis / jms-testkit   1.0.4

Apache License 2.0 GitHub

in-memory JMS broker for unit testing (Scala, Java)

Scala versions: 3.x 2.13 2.12 2.11

jms-testkit

in-memory JMS library

Scala build.sbt


"io.github.sullis" %% "jms-testkit" % "1.0.4" % Test


Scala code example


import jmstestkit.JmsQueue

val queue = JmsQueue()

queue.publishMessage("Portland")
queue.publishMessage("Seattle")

System.out.println("queueName: " + queue.queueName)
System.out.println("size: " + queue.size)
System.out.println("snapshot: " + queue.toSeq)

val connFactory = queue.createQueueConnectionFactory // javax.jms.QueueConnectionFactory

Maven pom.xml

<dependency>
    <groupId>io.github.sullis</groupId>
    <artifactId>jms-testkit_2.12</artifactId>
    <version>1.0.4</version>
    <scope>test</scope>
</dependency>

Java code example


import jmstestkit.JmsQueue;
import javax.jms.QueueConnectionFactory;

JmsQueue queue = JmsQueue.apply();

queue.publishMessage("Whistler");
queue.publishMessage("Blackcomb");

System.out.println("queueName: " + queue.queueName());
System.out.println("size: " + queue.size());
System.out.println("snapshot: " + queue.toJavaList());

QueueConnectionFactory connFactory = queue.createQueueConnectionFactory();

Projects that use [jms-testkit]

Related resources

Acknowledgements

This project uses sbt-ci-release