notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2085 - development/main/metro/unit/src/main/net/dpml/metro/unit
- From: niclas AT hedhman.org
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2085 - development/main/metro/unit/src/main/net/dpml/metro/unit
- Date: Sat, 19 Mar 2005 15:44:24 -0500
Author: niclas AT hedhman.org
Date: Sat Mar 19 15:44:23 2005
New Revision: 2085
Modified:
development/main/metro/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
Log:
Added URL loading of blocks.
Modified:
development/main/metro/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
==============================================================================
---
development/main/metro/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
(original)
+++
development/main/metro/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
Sat Mar 19 15:44:23 2005
@@ -22,6 +22,7 @@
import java.io.IOException;
import java.net.URI;
+import java.net.URL;
import java.util.HashMap;
import java.util.Hashtable;
@@ -142,17 +143,29 @@
/**
* Create a containment model relative to the supplied path.
- * @param path relative path to a block
+ * @param path path to a block relative to system property ${project.dir}
* @return the containment model
*/
protected ContainmentModel createContainmentModel( String path )
throws Exception
{
+ File source = new File( WORK, path );
+ URL url = source.toURL();
+ return createContainmentModel( url );
+ }
+
+ /**
+ * Create a containment model from the supplied URL.
+ * @param model URL to a block
+ * @return the containment model
+ */
+ protected ContainmentModel createContainmentModel( URL model )
+ throws Exception
+ {
try
{
setupCompositionRoot();
- File source = new File( WORK, path );
- return getRoot().addContainmentModel( source.toURL() );
+ return getRoot().addContainmentModel( model );
}
catch( Throwable e )
{
- svn commit: r2085 - development/main/metro/unit/src/main/net/dpml/metro/unit, niclas, 03/19/2005
Archive powered by MHonArc 2.6.24.