Cached set export

2004-05-03 Thread Nick Chalko
The cached set export task is now working
The junit build.xml test  called testExport1  exports this xml.
chachedresourceset id=test1
   resource name=helloworld
 version=1.1
 
href=file://C:/workspace/depot-update/src/resources/test/repo/helloworld/jars/helloworld-1.1.jar/
/chachedresourceset 

Tomorrow I will work on the xslt that generates a 
use-cached-resources-build.xml.

As always improvements are always welcome.  Especially for task/type names.
R,
Nick


Fw: cvs commit: gump/project depot.xml

2004-05-03 Thread Adam R. B. Jack

   +depend project=xmlunit/

Cool, but what does it do  what do we use it for? Just curious.

regards

Adam


Re: Fw: cvs commit: gump/project depot.xml

2004-05-03 Thread Nick Chalko
Adam R. B. Jack wrote:
 +depend project=xmlunit/
   

Cool, but what does it do  what do we use it for? Just curious.
 

JUnit asserts for XML
I use it to assert that the XML content of two files are equal. 

Like this.
   /**
* Test the exporting of cached set test1.
* 
*/
   public void testExport1() throws FileNotFoundException, SAXException,
   IOException, ParserConfigurationException {
   try {
   executeTarget(testExport1);
   File generatedFile = new File(build/test1-export.build.xml);
   File expectedFile = new File(
   
src/test/org/apache/depot/update/ant/test1-export.build.xml);
   assertTrue(Expected  + generatedFile +  to  exists,
   generatedFile.exists());
   XMLAssert
   .assertXMLEqual(Exported cached set test1,
   new FileReader(expectedFile), new FileReader(
   generatedFile));
   } finally {
   System.out.println(getOutput());
   }
   }