Re: [loom] properties in configuration
peter-4lf8KW9E9MLMqX/[email protected]
| Newsgroups | gmane.comp.java.jcontainer.interest |
|---|---|
| Message-ID | <01a001c3afdb$a3b0d6c0$21e7809d@fisg2> |
Hiya, From: "Ryan Hoegg" <[email protected]> > OK here's a patch and some new classes. I did it by subclassing > org.jcontainer.dna.impl.SAXConfigurationHandler. Going forward the test > case will probably end up looking a lot different, I just wanted pdonald > to see the code so he could stew on how best to allow reuse of some of > the DNA test logic. The idea is just to make sure the > LoomSAXConfigurationHandler behaves as any SAXConfigurationHandler > should, while also testing that it performs its extra functionality > correctly. I had a quick look and it looks good. Before I apply it though I guess we should figure out if it is exactly what we want. Basically what it does IIUC is grab a config.properties from base directory of .sar and use that to interpolate the SAR-INF/config.xml. My initial reaction is that the config.proeprties should be in SAR-INF/ directory. Anyone else have any opinions? As for unit testing my initial reaction would to be just unit test the methods you over-rode. ie Only unit test processValueText, processAttributeText and expandProperties. Then later on when we do integration unit testing we write a block that epects certain values in its context. These would only be accessible via interpolation and thus the unit test would start u[p component and read values and except if non matching. Whats every one else think? If good we can write some doucmentation and apply the patch.