Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #31 - Add tests for publishing an event to JMS #34

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target/
/jms/nbproject/
35 changes: 35 additions & 0 deletions jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
<artifactId>colibri-jms</artifactId>
<packaging>jar</packaging>
<name>Manorrock Colibri - JMS</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.manorrock.colibri</groupId>
Expand All @@ -22,5 +34,28 @@
<artifactId>jakarta.jms-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.mq</groupId>
<artifactId>mq-client</artifactId>
<version>6.4.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,26 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package com.manorrock.colibri.jms;

import com.sun.messaging.ConnectionFactory;
import org.junit.jupiter.api.Test;

/**
* The module-info for the JMS implementation.
* The JUnit tests for the JmsTextMessageEventPublisher class.
*
* @author Manfred Riem (mriem@manorrock.com)
*/
module com.manorrock.colibri.jms {
public class JmsTextMessageEventPublisherTest {

exports com.manorrock.colibri.jms;
opens com.manorrock.colibri.jms;
requires com.manorrock.colibri.api;
requires jakarta.messaging;
/**
* Test publish method.
*/
@Test
public void testPublish() {
ConnectionFactory connectionFactory = new ConnectionFactory();
JmsTextMessageEventPublisher<String> publisher =
new JmsTextMessageEventPublisher(connectionFactory, "colibri");
publisher.publish("Hello World!");
}
}