dion 2002/06/27 19:19:26
Modified: src/test/java/org/apache/maven/build RepositoryTest.java
Log:
Refactor dummyRepo out
Revision Changes Path
1.3 +6 -8
jakarta-turbine-maven/src/test/java/org/apache/maven/build/RepositoryTest.java
Index: RepositoryTest.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/test/java/org/apache/maven/build/RepositoryTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RepositoryTest.java 27 Jun 2002 23:58:52 -0000 1.2
+++ RepositoryTest.java 28 Jun 2002 02:19:26 -0000 1.3
@@ -73,6 +73,8 @@
{
/** baseURL as a file name */
private String baseURL;
+ /** dummy repository */
+ private URL dummyRepo;
/** the instance being tested */
private Repository instance;
@@ -99,6 +101,7 @@
assertNotNull("The system property file.separator was not defined.",
fs);
baseURL = baseDir + TestConstantsTest.BUILD_DIR;
+ dummyRepo = new File(baseURL+"/dummy.repo").toURL();
}
/**
@@ -135,9 +138,7 @@
testConstructor();
assertTrue("non distributable jars list found erroneously",
!instance.hasNonDistributableJarsList());
- String baseURLAsString = new File(baseURL+"/dummy.repo").toURL().
- toExternalForm();
- instance = new Repository(baseURLAsString);
+ instance = new Repository(dummyRepo);
assertTrue("non distributable jars list not found",
instance.hasNonDistributableJarsList());
}
@@ -149,9 +150,7 @@
*/
public void testNonDistributableJars() throws Exception
{
- String baseURLAsString = new File(baseURL+"/dummy.repo").toURL().
- toExternalForm();
- instance = new Repository(baseURLAsString);
+ instance = new Repository(dummyRepo);
assertEquals("wrong number of entries", 1,
instance.getNonDistributableJars().size());
}
@@ -166,7 +165,6 @@
testConstructor();
assertTrue("plugins list found erroneously",
!instance.hasPluginList());
- URL dummyRepo = new File(baseURL+"/dummy.repo").toURL();
instance = new Repository(dummyRepo);
assertTrue("plugin list not found",
instance.hasPluginList());
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>