[jboss-svn-commits] JBL Code SVN: r13360 - labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 11 10:32:41 EDT 2007


Author: tcunning
Date: 2007-07-11 10:32:41 -0400 (Wed, 11 Jul 2007)
New Revision: 13360

Added:
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperUnitTest.java
Removed:
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperTest.java
Log:
bug:JBESB-563
Rename MessageMapperTest so that it gets picked up by the build.xml 
*UnitTest.java.


Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperTest.java	2007-07-11 13:51:51 UTC (rev 13359)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperTest.java	2007-07-11 14:32:41 UTC (rev 13360)
@@ -1,133 +0,0 @@
-/**
- * 
- */
-package org.jboss.soa.esb.message.mapping;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.junit.Test;
-
-
-/**
- * @author kstam
- *
- */
-public class MessageMapperTest {
-
-    @Test
-    public void property () {
-        ObjectMapper mapper = new ObjectMapper();
-        Message message = MessageFactory.getInstance().getMessage();
-        List<String> variableList = new ArrayList<String>();
-        
-        message.getProperties().setProperty("property1", "some object");
-        variableList.add("property.property1");
-        
-        TestPojo testPojo1 = new TestPojo();
-        testPojo1.setCount(1);
-        testPojo1.setName("test1");
-        TestPojo testPojo2 = new TestPojo();
-        testPojo2.setCount(1);
-        testPojo2.setName("test2");
-        testPojo1.setTestPojo(testPojo2);
-        message.getProperties().setProperty("property2", testPojo1);
-        variableList.add("property.property2.testPojo.testPojo");
-        
-        List<Object> pojos=mapper.createObjectList(message, variableList);
-        
-        Object pojo1 = pojos.get(0);
-        assertTrue("some object".equals(pojo1));
-        
-        Object pojo2 = pojos.get(1);
-        assertTrue(testPojo2.equals(pojo2));
-    }
-    
-    @Test
-    public void attachment_hashmap() {
-        ObjectMapper mapper = new ObjectMapper();
-        Message message = MessageFactory.getInstance().getMessage();
-        List<String> variableList = new ArrayList<String>();
-        
-        message.getAttachment().put("attachment1", "some object");
-        variableList.add("attachment.attachment1");
-        
-        TestPojo testPojo1 = new TestPojo();
-        testPojo1.setCount(1);
-        testPojo1.setName("test1");
-        TestPojo testPojo2 = new TestPojo();
-        testPojo2.setCount(1);
-        testPojo2.setName("test2");
-        testPojo1.setTestPojo(testPojo2);
-        message.getAttachment().put("attachment2", testPojo1);
-        variableList.add("attachment.attachment2.testPojo.testPojo");
-        
-        List<Object> pojos=mapper.createObjectList(message, variableList);
-        
-        Object pojo1 = pojos.get(0);
-        assertTrue("some object".equals(pojo1));
-        
-        Object pojo2 = pojos.get(1);
-        assertTrue(testPojo2.equals(pojo2));  
-    }
-    
-    @Test
-    public void attachment_list() {
-        ObjectMapper mapper = new ObjectMapper();
-        Message message = MessageFactory.getInstance().getMessage();
-        List<String> variableList = new ArrayList<String>();
-        
-        message.getAttachment().addItem("some object");
-        variableList.add("attachment.0");
-        
-        TestPojo testPojo1 = new TestPojo();
-        testPojo1.setCount(1);
-        testPojo1.setName("test1");
-        TestPojo testPojo2 = new TestPojo();
-        testPojo2.setCount(1);
-        testPojo2.setName("test2");
-        testPojo1.setTestPojo(testPojo2);
-        message.getAttachment().addItem(testPojo1);
-        variableList.add("attachment.1.testPojo.testPojo");
-        
-        List<Object> pojos=mapper.createObjectList(message, variableList);
-        
-        Object pojo1 = pojos.get(0);
-        assertTrue("some object".equals(pojo1));
-        
-        Object pojo2 = pojos.get(1);
-        assertTrue(testPojo2.equals(pojo2));
-    }
-    
-    @Test
-    public void body() {
-        ObjectMapper mapper = new ObjectMapper();
-        Message message = MessageFactory.getInstance().getMessage();
-        List<String> variableList = new ArrayList<String>();
-        
-        message.getBody().add("body1", "some object");
-        variableList.add("body.body1");
-        
-        TestPojo testPojo1 = new TestPojo();
-        testPojo1.setCount(1);
-        testPojo1.setName("test1");
-        TestPojo testPojo2 = new TestPojo();
-        testPojo2.setCount(1);
-        testPojo2.setName("test2");
-        testPojo1.setTestPojo(testPojo2);
-        message.getBody().add("body2", testPojo1);
-        variableList.add("body.body2.testPojo.testPojo");
-        
-        List<Object> pojos=mapper.createObjectList(message, variableList);
-        
-        Object pojo1 = pojos.get(0);
-        assertTrue("some object".equals(pojo1));
-        
-        Object pojo2 = pojos.get(1);
-        assertTrue(testPojo2.equals(pojo2));  
-    }
-}

Added: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperUnitTest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/message/mapping/MessageMapperUnitTest.java	2007-07-11 14:32:41 UTC (rev 13360)
@@ -0,0 +1,128 @@
+/**
+ * 
+ */
+package org.jboss.soa.esb.message.mapping;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+
+
+/**
+ * @author kstam
+ *
+ */
+public class MessageMapperUnitTest extends TestCase {
+
+    public void testProperty () {
+        ObjectMapper mapper = new ObjectMapper();
+        Message message = MessageFactory.getInstance().getMessage();
+        List<String> variableList = new ArrayList<String>();
+        
+        message.getProperties().setProperty("property1", "some object");
+        variableList.add("property.property1");
+        
+        TestPojo testPojo1 = new TestPojo();
+        testPojo1.setCount(1);
+        testPojo1.setName("test1");
+        TestPojo testPojo2 = new TestPojo();
+        testPojo2.setCount(1);
+        testPojo2.setName("test2");
+        testPojo1.setTestPojo(testPojo2);
+        message.getProperties().setProperty("property2", testPojo1);
+        variableList.add("property.property2.testPojo.testPojo");
+        
+        List<Object> pojos=mapper.createObjectList(message, variableList);
+        
+        Object pojo1 = pojos.get(0);
+        assertTrue("some object".equals(pojo1));
+        
+        Object pojo2 = pojos.get(1);
+        assertTrue(testPojo2.equals(pojo2));
+    }
+    
+    public void testAttachment_hashmap() {
+        ObjectMapper mapper = new ObjectMapper();
+        Message message = MessageFactory.getInstance().getMessage();
+        List<String> variableList = new ArrayList<String>();
+        
+        message.getAttachment().put("attachment1", "some object");
+        variableList.add("attachment.attachment1");
+        
+        TestPojo testPojo1 = new TestPojo();
+        testPojo1.setCount(1);
+        testPojo1.setName("test1");
+        TestPojo testPojo2 = new TestPojo();
+        testPojo2.setCount(1);
+        testPojo2.setName("test2");
+        testPojo1.setTestPojo(testPojo2);
+        message.getAttachment().put("attachment2", testPojo1);
+        variableList.add("attachment.attachment2.testPojo.testPojo");
+        
+        List<Object> pojos=mapper.createObjectList(message, variableList);
+        
+        Object pojo1 = pojos.get(0);
+        assertTrue("some object".equals(pojo1));
+        
+        Object pojo2 = pojos.get(1);
+        assertTrue(testPojo2.equals(pojo2));  
+    }
+    
+    public void testAttachment_list() {
+        ObjectMapper mapper = new ObjectMapper();
+        Message message = MessageFactory.getInstance().getMessage();
+        List<String> variableList = new ArrayList<String>();
+        
+        message.getAttachment().addItem("some object");
+        variableList.add("attachment.0");
+        
+        TestPojo testPojo1 = new TestPojo();
+        testPojo1.setCount(1);
+        testPojo1.setName("test1");
+        TestPojo testPojo2 = new TestPojo();
+        testPojo2.setCount(1);
+        testPojo2.setName("test2");
+        testPojo1.setTestPojo(testPojo2);
+        message.getAttachment().addItem(testPojo1);
+        variableList.add("attachment.1.testPojo.testPojo");
+        
+        List<Object> pojos=mapper.createObjectList(message, variableList);
+        
+        Object pojo1 = pojos.get(0);
+        assertTrue("some object".equals(pojo1));
+        
+        Object pojo2 = pojos.get(1);
+        assertTrue(testPojo2.equals(pojo2));
+    }
+    
+    public void testBody() {
+        ObjectMapper mapper = new ObjectMapper();
+        Message message = MessageFactory.getInstance().getMessage();
+        List<String> variableList = new ArrayList<String>();
+        
+        message.getBody().add("body1", "some object");
+        variableList.add("body.body1");
+        
+        TestPojo testPojo1 = new TestPojo();
+        testPojo1.setCount(1);
+        testPojo1.setName("test1");
+        TestPojo testPojo2 = new TestPojo();
+        testPojo2.setCount(1);
+        testPojo2.setName("test2");
+        testPojo1.setTestPojo(testPojo2);
+        message.getBody().add("body2", testPojo1);
+        variableList.add("body.body2.testPojo.testPojo");
+        
+        List<Object> pojos=mapper.createObjectList(message, variableList);
+        
+        Object pojo1 = pojos.get(0);
+        assertTrue("some object".equals(pojo1));
+        
+        Object pojo2 = pojos.get(1);
+        assertTrue(testPojo2.equals(pojo2));  
+    }
+}




More information about the jboss-svn-commits mailing list