deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject git commit: make sure our MessageBundle mesages are fully Serializable
Date Mon, 29 Jul 2013 04:48:09 GMT
Updated Branches:
  refs/heads/master e06f658ed -> 6bb833743


make sure our MessageBundle mesages are fully Serializable


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/6bb83374
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/6bb83374
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/6bb83374

Branch: refs/heads/master
Commit: 6bb83374332a7506ecac4d688ea7f95db4aa8ee4
Parents: e06f658
Author: Mark Struberg <struberg@apache.org>
Authored: Fri Jul 26 18:30:28 2013 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Fri Jul 26 18:30:28 2013 +0200

----------------------------------------------------------------------
 .../test/core/api/message/SimpleMessageTest.java          | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/6bb83374/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/SimpleMessageTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/SimpleMessageTest.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/SimpleMessageTest.java
index e7767e3..5ee43d7 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/SimpleMessageTest.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/SimpleMessageTest.java
@@ -21,6 +21,7 @@ package org.apache.deltaspike.test.core.api.message;
 import org.apache.deltaspike.core.api.message.LocaleResolver;
 import org.apache.deltaspike.core.impl.message.MessageBundleExtension;
 import org.apache.deltaspike.test.category.SeCategory;
+import org.apache.deltaspike.test.category.Serializer;
 import org.apache.deltaspike.test.util.ArchiveUtils;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
@@ -36,6 +37,7 @@ import javax.enterprise.inject.spi.Extension;
 import javax.inject.Inject;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests for {@link org.apache.deltaspike.core.api.message.MessageTemplate}
@@ -99,4 +101,12 @@ public class SimpleMessageTest
         String result = simpleMessage.welcomeWithStringVariable(null);
         assertEquals(expectedResult, result);
     }
+
+    @Test
+    public void testMessageSerialisation() {
+        Serializer<SimpleMessage> simpleMessageSerializer = new Serializer<SimpleMessage>();
+
+        SimpleMessage sm2 = simpleMessageSerializer.roundTrip(simpleMessage);
+        assertNotNull(sm2);
+    }
 }


Mime
View raw message