1   /*
2    * Created on Jul 31, 2003
3    *
4    * To change this generated comment go to 
5    * Window>Preferences>Java>Code Generation>Code Template
6    */
7   package org.codehaus.classworlds;
8   
9   import java.io.File;
10  import java.net.MalformedURLException;
11  import java.net.URL;
12  
13  /***
14   * @author <a href="bwalding@jakarta.org">Ben Walding</a>
15   * @version $Id: TestUtil.java,v 1.1.1.1 2004/07/01 13:59:22 jvanzyl Exp $
16   */
17  public class TestUtil
18  {
19      public static URL getTestResourceUrl( String resourceName )
20          throws MalformedURLException
21      {
22          File baseDir = new File( System.getProperty( "basedir" ) );
23  
24          File testDir = new File( baseDir, "target/test-data" );
25  
26          File resourceFile = new File( testDir, resourceName );
27  
28          return resourceFile.toURL();
29      }
30  
31  }