This is an automated email from the ASF dual-hosted git repository.
vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new cbc274f remove (useless) SenderTest + mockrunner-jms/nekohtml
(FINERACT-938)
cbc274f is described below
commit cbc274f603245ef2fd10d5923a05ed8c77f3e610
Author: Michael Vorburger <[email protected]>
AuthorDate: Fri May 8 13:41:02 2020 +0200
remove (useless) SenderTest + mockrunner-jms/nekohtml (FINERACT-938)
---
fineract-provider/build.gradle | 6 +-
fineract-provider/dependencies.gradle | 3 -
.../notification/data/NotificationData.java | 2 -
.../apache/fineract/notification/SenderTest.java | 78 ----------------------
.../resources/META-INF/testNotificationContext.xml | 52 ---------------
5 files changed, 2 insertions(+), 139 deletions(-)
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 5bcba34..1ec2d1d 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -105,16 +105,14 @@ dependencyManagement {
dependency 'io.swagger:swagger-jersey-jaxrs:1.6.1'
dependency 'jakarta.management.j2ee:jakarta.management.j2ee-api:1.1.4'
dependency 'jakarta.jms:jakarta.jms-api:2.0.3'
- dependency 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3'
+ dependency 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3'
dependency 'org.apache.activemq:activemq-broker:+'
dependency 'org.apache.bval:org.apache.bval.bundle:2.0.3'
dependency 'junit:junit:+'
dependency 'org.mockito:mockito-core:+'
- dependency 'com.mockrunner:mockrunner-jms:2.0.4'
dependency 'io.github.classgraph:classgraph:4.8.78'
dependency 'org.dom4j:dom4j:2.1.0'
- dependency 'nekohtml:nekohtml:1.9.6.2'
- dependency 'org.awaitility:awaitility:4.0.2'
+ dependency 'org.awaitility:awaitility:4.0.2'
dependencySet(group: 'com.sun.jersey', version: jerseyVersion) {
entry 'jersey-core'
diff --git a/fineract-provider/dependencies.gradle
b/fineract-provider/dependencies.gradle
index ec2b9cb..7bc6364 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-provider/dependencies.gradle
@@ -120,9 +120,6 @@ dependencies {
exclude group: 'commons-logging'
exclude group: 'org.apache.sling'
}
- testImplementation ('com.mockrunner:mockrunner-jms') {
- exclude group: 'regexp'
- }
testImplementation ('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'com.jayway.jsonpath', module: 'json-path'
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationData.java
b/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationData.java
index a7f97f9..bcfb3cf 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationData.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationData.java
@@ -37,7 +37,6 @@ public class NotificationData implements Serializable {
private List<Long> userIds;
public NotificationData() {
-
}
public NotificationData(String objectType, Long objectId, String action,
Long actorId, String content, boolean isSystemGenerated,
@@ -149,5 +148,4 @@ public class NotificationData implements Serializable {
public void setTenantIdentifier(String tenantIdentifier) {
this.tenantIdentifier = tenantIdentifier;
}
-
}
diff --git
a/fineract-provider/src/test/java/org/apache/fineract/notification/SenderTest.java
b/fineract-provider/src/test/java/org/apache/fineract/notification/SenderTest.java
deleted file mode 100644
index a16985f..0000000
---
a/fineract-provider/src/test/java/org/apache/fineract/notification/SenderTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.notification;
-
-import com.mockrunner.mock.jms.MockQueue;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import org.apache.fineract.notification.data.NotificationData;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-@ContextConfiguration(locations = {
- "classpath:META-INF/testNotificationContext.xml",
-})
-@RunWith(SpringJUnit4ClassRunner.class)
-public class SenderTest {
- private final static Logger LOG =
LoggerFactory.getLogger(SenderTest.class);
- @Autowired
- private JmsTemplate jmsTemplate;
-
- @Autowired
- private MockQueue mockQueue;
-
- @Test
- public void notificationCreation() {
-
- String objectType = "CLIENT";
- Long objectIdentifier = 1L;
- String action = "created";
- Long actorId = 1L;
- String notificationContent = "A client was created";
-
- NotificationData notificationData = new NotificationData(
- objectType,
- objectIdentifier,
- action,
- actorId,
- notificationContent,
- false,
- false,
- null,
- null,
- null
- );
-
- jmsTemplate.send(mockQueue, new MessageCreator() {
- @Override
- public Message createMessage(Session session) throws JMSException {
- LOG.info("Message send successfully");
- return session.createObjectMessage(notificationData);
- }
- });
- }
-}
diff --git
a/fineract-provider/src/test/resources/META-INF/testNotificationContext.xml
b/fineract-provider/src/test/resources/META-INF/testNotificationContext.xml
deleted file mode 100644
index 580b2ca..0000000
--- a/fineract-provider/src/test/resources/META-INF/testNotificationContext.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:jms="http://www.springframework.org/schema/jms"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-2.5.xsd">
-
- <bean id="destinationManager"
class="com.mockrunner.jms.DestinationManager"/>
-
- <bean id="mockQueue" factory-bean="destinationManager"
factory-method="createQueue">
- <constructor-arg index="0" value="demoMockRunnerQueue" />
- </bean>
-
- <bean id="configurationManager"
class="com.mockrunner.jms.ConfigurationManager"/>
-
- <bean id="jmsQueueConnectionFactory"
class="com.mockrunner.mock.jms.MockQueueConnectionFactory">
- <constructor-arg index="0" ref="destinationManager" />
- <constructor-arg index="1" ref="configurationManager" />
- </bean>
-
- <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
- <property name="connectionFactory" ref="jmsQueueConnectionFactory" />
- </bean>
-
- <jms:listener-container connection-factory="jmsQueueConnectionFactory" >
- <jms:listener destination="demoMockRunnerQueue" ref="testListener"
method="onMessage" />
- </jms:listener-container>
-
- <bean id="testListener" class="org.apache.fineract.notification.Listener"
/>
-
-</beans>