qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: Add some additional tests.
Date Fri, 10 Oct 2014 14:17:51 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master ba54a036f -> 12cb11ef5


Add some additional tests.

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/12cb11ef
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/12cb11ef
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/12cb11ef

Branch: refs/heads/master
Commit: 12cb11ef5a94144af44a0b2f2fefc59fa5aa2370
Parents: ba54a03
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Oct 10 10:17:44 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Fri Oct 10 10:17:44 2014 -0400

----------------------------------------------------------------------
 .../amqp/message/AmqpJmsMessageFacadeTest.java    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/12cb11ef/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java
index 250e09f..7346559 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java
@@ -59,6 +59,7 @@ import org.apache.qpid.proton.amqp.messaging.Properties;
 import org.apache.qpid.proton.codec.impl.DataImpl;
 import org.apache.qpid.proton.message.Message;
 import org.junit.Test;
+import org.mockito.Mockito;
 
 public class AmqpJmsMessageFacadeTest extends AmqpJmsMessageTypesTestCase  {
 
@@ -1676,4 +1677,21 @@ public class AmqpJmsMessageFacadeTest extends AmqpJmsMessageTypesTestCase
 {
         assertEquals(1, copy.getPropertyNames().size());
         assertEquals(amqpTtl, copy.getProperty(AmqpMessageSupport.JMS_AMQP_TTL));
     }
+
+    // ====== AMQP Message Facade misc tests =========
+    // ===============================================
+
+    @Test
+    public void testIsEmpty() {
+        AmqpJmsMessageFacade message = createNewMessageFacade();
+        assertTrue(message.isEmpty());
+    }
+
+    @Test
+    public void testClearBodyRemoveMessageBody() {
+        Message message = Mockito.mock(Message.class);
+        JmsMessageFacade amqpMessageFacade = createReceivedMessageFacade(createMockAmqpConsumer(),
message);
+        amqpMessageFacade.clearBody();
+        Mockito.verify(message).setBody(null);
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message