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

Ales Justin (JIRA) jira-events at jboss.com
Fri Jan 26 11:34:57 EST 2007


     [ http://jira.jboss.com/jira/browse/JBMICROCONT-142?page=all ]

Ales Justin resolved JBMICROCONT-142.
-------------------------------------

    Fix Version/s: JBossMC_2_0_0_CR1
       Resolution: Done

Added the code from initial comment.
Also added additional helper methods to JBoss-test project.

All of the XML + metadata tests pass.
But had to change JavaBeans tests to use Serializable class - this is still a possible TODO, since we can push this restriction to serialization layer.


> 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
>             Fix For: JBossMC_2_0_0_CR1
>
>
> 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