This content has been marked as final.
Show 4 replies
-
1. Re: VFSStructureBuilderUnitTestCase todo
adrian.brock Mar 12, 2008 10:29 AM (in response to alesj)These tests are broken in two ways. ;-)
1) NO "" CONTEXTDeployment deployment = createDeployment(); StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData(); MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects(); attachments.addAttachment(StructureMetaData.class, structure);
It is creating a structure with no contexts then comparing it against
an artifical context it creates in the tests???? :-)protected void checkDeployment(DeploymentContext context, Deployment deployment) throws Exception { assertNotNull(context); assertEquals(deployment.getName(), context.getName()); MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects(); StructureMetaData structure = attachments.getAttachment(StructureMetaData.class); checkAttachments(context, deployment); checkDeployment(context, structure); // HERE! ContextInfo contextInfo = structure.getContext(""); if (contextInfo == null) contextInfo = StructureMetaDataFactory.createContextInfo(); checkContextInfo(context, contextInfo); }
I should probably be adding the "" context to the stucture before running it
through the builder.
2) VFSStructureBuilderUnitTestCase SHOULD USE THE FILESYSTEM
But , this is stupid anyway. Because the VFSStructureBuilderUnitTestCase
should be creating the structure from the file system. ;-)
The whole test needs cloning rather subclassing (and before you ask,
you can remove the attachment checks since they are irrelevant to the test). -
2. Re: VFSStructureBuilderUnitTestCase todo
alesj Mar 12, 2008 10:40 AM (in response to alesj)"adrian@jboss.org" wrote:
2) VFSStructureBuilderUnitTestCase SHOULD USE THE FILESYSTEM
But , this is stupid anyway. Because the VFSStructureBuilderUnitTestCase
should be creating the structure from the file system. ;-)
The whole test needs cloning rather subclassing (and before you ask,
you can remove the attachment checks since they are irrelevant to the test).
You mean running it over Structure deployers? -
3. Re: VFSStructureBuilderUnitTestCase todo
adrian.brock Mar 12, 2008 12:05 PM (in response to alesj)"alesj" wrote:
"adrian@jboss.org" wrote:
2) VFSStructureBuilderUnitTestCase SHOULD USE THE FILESYSTEM
But , this is stupid anyway. Because the VFSStructureBuilderUnitTestCase
should be creating the structure from the file system. ;-)
The whole test needs cloning rather subclassing (and before you ask,
you can remove the attachment checks since they are irrelevant to the test).
You mean running it over Structure deployers?
Correct. But you should only need the explict structure deployer.
There should be jboss-structure.xml files in the test deployments. -
4. Re: VFSStructureBuilderUnitTestCase todo
alesj Mar 12, 2008 12:06 PM (in response to alesj)"adrian@jboss.org" wrote:
Correct. But you should only need the explict structure deployer.
There should be jboss-structure.xml files in the test deployments.
Already done. ;-)