[jboss-jira] [JBoss JIRA] Created: (JBMICROCONT-142) Need to test serialization of AbstractKernelDeployment and BeanMetaData, etc.

Adrian Brock (JIRA) jira-events at jboss.com
Mon Jan 22 08:15:52 EST 2007


Need to test serialization of AbstractKernelDeployment and BeanMetaData, etc.
-----------------------------------------------------------------------------

                 Key: JBMICROCONT-142
                 URL: http://jira.jboss.com/jira/browse/JBMICROCONT-142
             Project: JBoss MicroContainer
          Issue Type: Task
          Components: MetaData
    Affects Versions: JBossMC_2_0_0 Beta
            Reporter: Adrian Brock
         Assigned To: Ales Justin


There are currently no tests for the serialzation of the MC metadata.

A simple way to make sure everything is being tested would be to update the xml parsing tests
which create every possible type of metadata.

i.e. in org.jboss.test.kernel.deployment.xml.test.AbstractXMLTest
   
   /**
    * Unmarshal some xml
    * 
    * @param name the name
    * @param expected the expected class
    * @return the unmarshalled object
    * @throws Exception for any error
    */
   protected Object unmarshal(String name, Class<?> expected) throws Exception
   {
      String url = findXML(name);
      Object object = getJBossXBDelegate().unmarshal(url);
      if (object == null)
         fail("No object from " + name);

+    // Test that serialize/deserialize works accurately reproduces the object
+    object = deserialize(serialize(object));

      assertTrue("Object '" + object + "' cannot be assigned to " + expected.getName(), expected.isAssignableFrom(object.getClass()));

      return object;
   }

And then fixing any problems found.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list