Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java Thu Dec 27 16:11:39 2007 @@ -208,12 +208,11 @@ } private RetrieveOptions getRetrieveOptions() { - return new RetrieveOptions().setCache(CacheManager.getInstance(ivy.getSettings(), cache)); + return new RetrieveOptions(); } private ResolveOptions getResolveOptions(String[] confs) { - return new ResolveOptions().setConfs(confs).setCache( - CacheManager.getInstance(ivy.getSettings(), cache)); + return new ResolveOptions().setConfs(confs); } }
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java Thu Dec 27 16:11:39 2007 @@ -186,7 +186,6 @@ } private ResolveOptions getResolveOptions() { - return new ResolveOptions().setCache(CacheManager.getInstance(ivy.getSettings())) - .setValidate(false); + return new ResolveOptions().setValidate(false); } } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/RegexpConflictManagerTest.java Thu Dec 27 16:11:39 2007 @@ -77,7 +77,6 @@ } private ResolveOptions getResolveOptions() { - return new ResolveOptions().setCache(CacheManager.getInstance(ivy.getSettings())) - .setValidate(false); + return new ResolveOptions().setValidate(false); } } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/StrictConflictManagerTest.java Thu Dec 27 16:11:39 2007 @@ -80,7 +80,6 @@ } private ResolveOptions getResolveOptions() { - return new ResolveOptions().setCache(CacheManager.getInstance(ivy.getSettings())) - .setValidate(false); + return new ResolveOptions().setValidate(false); } } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/lock/ArtifactLockStrategyTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/lock/ArtifactLockStrategyTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/lock/ArtifactLockStrategyTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/lock/ArtifactLockStrategyTest.java Thu Dec 27 16:11:39 2007 @@ -87,6 +87,7 @@ private FileSystemResolver createSlowResolver(IvySettings settings, final int sleep) { FileSystemResolver resolver = new FileSystemResolver(); + resolver.setRepositoryCacheManager(newCacheManager(settings)); resolver.setRepository(new FileRepository() { private RepositoryCopyProgressListener progress = new RepositoryCopyProgressListener(this) { public void progress(CopyProgressEvent evt) { @@ -127,8 +128,7 @@ new DefaultDependencyDescriptor(ModuleRevisionId.parse(module), false), new ResolveData( new ResolveEngine(settings, new EventManager(), new SortEngine(settings)), - new ResolveOptions().setCache( - newCacheManager(settings)))); + new ResolveOptions())); } private void sleepSilently(int timeout) { try { Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportParserTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportParserTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportParserTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportParserTest.java Thu Dec 27 16:11:39 2007 @@ -66,7 +66,7 @@ ModuleRevisionId modRevId = report.getModuleDescriptor().getModuleRevisionId(); XmlReportParser parser = new XmlReportParser(); - parser.parse(_ivy.getCacheManager(_cache).getConfigurationResolveReportInCache( + parser.parse(_ivy.getResolutionCacheManager().getConfigurationResolveReportInCache( "testGetResolvedModule", "default")); ModuleRevisionId parsedModRevId = parser.getResolvedModule(); @@ -74,7 +74,6 @@ } private ResolveOptions getResolveOptions(String[] confs) { - return new ResolveOptions().setConfs(confs).setCache( - CacheManager.getInstance(_ivy.getSettings(), _cache)); + return new ResolveOptions().setConfs(confs); } } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportWriterTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportWriterTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportWriterTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportWriterTest.java Thu Dec 27 16:11:39 2007 @@ -120,7 +120,6 @@ } private ResolveOptions getResolveOptions(String[] confs) { - return new ResolveOptions().setConfs(confs).setCache( - CacheManager.getInstance(_ivy.getSettings(), _cache)); + return new ResolveOptions().setConfs(confs); } } Added: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/AbstractDependencyResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/AbstractDependencyResolverTest.java?rev=607146&view=auto ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/AbstractDependencyResolverTest.java (added) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/AbstractDependencyResolverTest.java Thu Dec 27 16:11:39 2007 @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.ivy.plugins.resolver; + +import org.apache.ivy.core.resolve.DownloadOptions; + +import junit.framework.TestCase; + +public class AbstractDependencyResolverTest extends TestCase { + + protected DownloadOptions downloadOptions() { + return new DownloadOptions(false); + } + +} Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/AbstractDependencyResolverTest.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/ChainResolverTest.java Thu Dec 27 16:11:39 2007 @@ -23,10 +23,7 @@ import java.util.GregorianCalendar; import java.util.List; -import junit.framework.TestCase; - import org.apache.ivy.core.IvyContext; -import org.apache.ivy.core.cache.CacheManager; import org.apache.ivy.core.event.EventManager; import org.apache.ivy.core.module.descriptor.Artifact; import org.apache.ivy.core.module.descriptor.DefaultArtifact; @@ -45,7 +42,6 @@ import org.apache.ivy.core.sort.SortEngine; import org.apache.ivy.plugins.latest.LatestRevisionStrategy; import org.apache.ivy.plugins.latest.LatestTimeStrategy; -import org.apache.ivy.util.Message; import org.apache.ivy.util.MockMessageLogger; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Delete; @@ -53,7 +49,7 @@ /** * Tests ChainResolver */ -public class ChainResolverTest extends TestCase { +public class ChainResolverTest extends AbstractDependencyResolverTest { private IvySettings settings; private ResolveEngine engine; @@ -66,8 +62,7 @@ settings = new IvySettings(); engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings)); cache = new File("build/cache"); - data = new ResolveData(engine, new ResolveOptions().setCache(CacheManager.getInstance( - settings, cache))); + data = new ResolveData(engine, new ResolveOptions()); cache.mkdirs(); settings.setDefaultCache(cache); } @@ -488,7 +483,7 @@ new Artifact[] {new DefaultArtifact( ModuleRevisionId.parse("org1#mod1.1;1.0"), new Date(), "mod1.1", "jar", "jar")}, - new DownloadOptions(CacheManager.getInstance(settings))); + new DownloadOptions(false)); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); assertEquals(DownloadStatus.SUCCESSFUL, report.getArtifactsReports()[0].getDownloadStatus()); Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/DualResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/DualResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/DualResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/DualResolverTest.java Thu Dec 27 16:11:39 2007 @@ -39,7 +39,7 @@ /** * Test for DualResolver */ -public class DualResolverTest extends TestCase { +public class DualResolverTest extends AbstractDependencyResolverTest { private IvySettings _settings; private ResolveEngine _engine; @@ -52,8 +52,7 @@ _settings = new IvySettings(); _engine = new ResolveEngine(_settings, new EventManager(), new SortEngine(_settings)); _cache = new File("build/cache"); - _data = new ResolveData(_engine, new ResolveOptions().setCache(CacheManager.getInstance( - _settings, _cache))); + _data = new ResolveData(_engine, new ResolveOptions()); _cache.mkdirs(); _settings.setDefaultCache(_cache); } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/FileSystemResolverTest.java Thu Dec 27 16:11:39 2007 @@ -23,8 +23,6 @@ import java.util.Date; import java.util.GregorianCalendar; -import junit.framework.TestCase; - import org.apache.ivy.core.cache.CacheManager; import org.apache.ivy.core.event.EventManager; import org.apache.ivy.core.module.descriptor.Artifact; @@ -53,7 +51,7 @@ /** * */ -public class FileSystemResolverTest extends TestCase { +public class FileSystemResolverTest extends AbstractDependencyResolverTest { //CheckStyle:MagicNumberCheck OFF private static final String FS = System.getProperty("file.separator"); @@ -79,8 +77,7 @@ settings = new IvySettings(); engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings)); cache = new File("build/cache"); - data = new ResolveData(engine, new ResolveOptions().setCache(CacheManager.getInstance( - settings, cache))); + data = new ResolveData(engine, new ResolveOptions()); cache.mkdirs(); cacheManager = new CacheManager(settings, cache); settings.setDefaultCache(cache); @@ -168,7 +165,7 @@ } private DownloadOptions getDownloadOptions(boolean useOrigin) { - return new DownloadOptions(cacheManager, useOrigin); + return new DownloadOptions(useOrigin); } public void testMaven2() throws Exception { Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java Thu Dec 27 16:11:39 2007 @@ -20,10 +20,7 @@ import java.io.File; import java.util.List; -import junit.framework.TestCase; - import org.apache.ivy.core.IvyContext; -import org.apache.ivy.core.cache.CacheManager; import org.apache.ivy.core.event.EventManager; import org.apache.ivy.core.module.descriptor.Artifact; import org.apache.ivy.core.module.descriptor.DefaultArtifact; @@ -34,7 +31,6 @@ import org.apache.ivy.core.report.ArtifactDownloadReport; import org.apache.ivy.core.report.DownloadReport; import org.apache.ivy.core.report.DownloadStatus; -import org.apache.ivy.core.resolve.DownloadOptions; import org.apache.ivy.core.resolve.ResolveData; import org.apache.ivy.core.resolve.ResolveEngine; import org.apache.ivy.core.resolve.ResolveOptions; @@ -42,7 +38,6 @@ import org.apache.ivy.core.settings.IvySettings; import org.apache.ivy.core.sort.SortEngine; import org.apache.ivy.plugins.matcher.ExactPatternMatcher; -import org.apache.ivy.util.Message; import org.apache.ivy.util.MockMessageLogger; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Delete; @@ -50,7 +45,7 @@ /** * */ -public class IBiblioResolverTest extends TestCase { +public class IBiblioResolverTest extends AbstractDependencyResolverTest { // remote.test private IvySettings _settings; @@ -65,8 +60,7 @@ _settings = new IvySettings(); _engine = new ResolveEngine(_settings, new EventManager(), new SortEngine(_settings)); _cache = new File("build/cache"); - _data = new ResolveData(_engine, new ResolveOptions().setCache(CacheManager.getInstance( - _settings, _cache))); + _data = new ResolveData(_engine, new ResolveOptions()); _cache.mkdirs(); _settings.setDefaultCache(_cache); } @@ -175,8 +169,7 @@ DefaultArtifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "commons-fileupload", "jar", "jar"); - DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions( - _settings, _cache)); + DownloadReport report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -189,7 +182,7 @@ // test to ask to download again, should use cache report = resolver.download(new Artifact[] {artifact}, - new DownloadOptions(_settings, _cache)); + downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -251,7 +244,7 @@ DefaultArtifact trace = new DefaultArtifact(mrid, rmr.getPublicationDate(), "nanning-trace", "jar", "jar"); DownloadReport report = resolver.download(new Artifact[] {profiler, trace}, - new DownloadOptions(_settings, _cache)); + downloadOptions()); assertNotNull(report); assertEquals(2, report.getArtifactsReports().length); @@ -269,8 +262,7 @@ assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus()); // test to ask to download again, should use cache - report = resolver.download(new Artifact[] {profiler, trace}, new DownloadOptions(_settings, - _cache)); + report = resolver.download(new Artifact[] {profiler, trace}, downloadOptions()); assertNotNull(report); assertEquals(2, report.getArtifactsReports().length); Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/IvyRepResolverTest.java Thu Dec 27 16:11:39 2007 @@ -20,9 +20,6 @@ import java.io.File; import java.util.List; -import junit.framework.TestCase; - -import org.apache.ivy.core.cache.CacheManager; import org.apache.ivy.core.event.EventManager; import org.apache.ivy.core.module.descriptor.Artifact; import org.apache.ivy.core.module.descriptor.DefaultArtifact; @@ -31,14 +28,10 @@ import org.apache.ivy.core.report.ArtifactDownloadReport; import org.apache.ivy.core.report.DownloadReport; import org.apache.ivy.core.report.DownloadStatus; -import org.apache.ivy.core.resolve.DownloadOptions; import org.apache.ivy.core.resolve.ResolveData; import org.apache.ivy.core.resolve.ResolveEngine; import org.apache.ivy.core.resolve.ResolveOptions; import org.apache.ivy.core.resolve.ResolvedModuleRevision; -import org.apache.ivy.core.search.ModuleEntry; -import org.apache.ivy.core.search.OrganisationEntry; -import org.apache.ivy.core.search.RevisionEntry; import org.apache.ivy.core.settings.IvySettings; import org.apache.ivy.core.sort.SortEngine; import org.apache.tools.ant.Project; @@ -47,7 +40,7 @@ /** * */ -public class IvyRepResolverTest extends TestCase { +public class IvyRepResolverTest extends AbstractDependencyResolverTest { private IvySettings _settings; private ResolveEngine _engine; @@ -60,8 +53,7 @@ _settings = new IvySettings(); _engine = new ResolveEngine(_settings, new EventManager(), new SortEngine(_settings)); _cache = new File("build/cache"); - _data = new ResolveData(_engine, new ResolveOptions().setCache(CacheManager.getInstance( - _settings, _cache))); + _data = new ResolveData(_engine, new ResolveOptions()); _cache.mkdirs(); _settings.setDefaultCache(_cache); } @@ -131,8 +123,7 @@ DefaultArtifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "mod1.1", "jar", "jar"); - DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions( - _settings, _cache)); + DownloadReport report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -144,8 +135,7 @@ assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus()); // test to ask to download again, should use cache - report = resolver.download(new Artifact[] {artifact}, - new DownloadOptions(_settings, _cache)); + report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/MockResolver.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/MockResolver.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/MockResolver.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/MockResolver.java Thu Dec 27 16:11:39 2007 @@ -25,6 +25,7 @@ import java.util.Date; import java.util.List; +import org.apache.ivy.core.cache.RepositoryCacheManager; import org.apache.ivy.core.module.descriptor.Artifact; import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor; import org.apache.ivy.core.module.descriptor.DependencyDescriptor; @@ -108,6 +109,10 @@ } public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) { + return null; + } + + public RepositoryCacheManager getRepositoryCacheManager() { return null; } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java Thu Dec 27 16:11:39 2007 @@ -21,9 +21,6 @@ import java.util.Date; import java.util.GregorianCalendar; -import junit.framework.TestCase; - -import org.apache.ivy.core.cache.CacheManager; import org.apache.ivy.core.event.EventManager; import org.apache.ivy.core.module.descriptor.Artifact; import org.apache.ivy.core.module.descriptor.DefaultArtifact; @@ -48,7 +45,7 @@ /** * Tests URLResolver. Http tests are based upon ibiblio site. */ -public class URLResolverTest extends TestCase { +public class URLResolverTest extends AbstractDependencyResolverTest { // remote.test private IvySettings _settings; @@ -62,8 +59,7 @@ _settings = new IvySettings(); _engine = new ResolveEngine(_settings, new EventManager(), new SortEngine(_settings)); _cache = new File("build/cache"); - _data = new ResolveData(_engine, new ResolveOptions().setCache(CacheManager.getInstance( - _settings, _cache))); + _data = new ResolveData(_engine, new ResolveOptions()); _cache.mkdirs(); _settings.setDefaultCache(_cache); } @@ -97,8 +93,7 @@ // test to ask to download DefaultArtifact artifact = new DefaultArtifact(mrid, pubdate, "mod1.1", "jar", "jar"); - DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions( - _settings, _cache)); + DownloadReport report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -110,8 +105,7 @@ assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus()); // test to ask to download again, should use cache - report = resolver.download(new Artifact[] {artifact}, - new DownloadOptions(_settings, _cache)); + report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -165,8 +159,7 @@ DefaultArtifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "commons-fileupload", "jar", "jar"); - DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions( - _settings, _cache)); + DownloadReport report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -178,8 +171,7 @@ assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus()); // test to ask to download again, should use cache - report = resolver.download(new Artifact[] {artifact}, - new DownloadOptions(_settings, _cache)); + report = resolver.download(new Artifact[] {artifact}, downloadOptions()); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); @@ -218,7 +210,7 @@ DefaultArtifact trace = new DefaultArtifact(mrid, rmr.getPublicationDate(), "nanning-trace", "jar", "jar"); DownloadReport report = resolver.download(new Artifact[] {profiler, trace}, - new DownloadOptions(_settings, _cache)); + downloadOptions()); assertNotNull(report); assertEquals(2, report.getArtifactsReports().length); @@ -236,8 +228,7 @@ assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus()); // test to ask to download again, should use cache - report = resolver.download(new Artifact[] {profiler, trace}, new DownloadOptions(_settings, - _cache)); + report = resolver.download(new Artifact[] {profiler, trace}, downloadOptions()); assertNotNull(report); assertEquals(2, report.getArtifactsReports().length); @@ -334,8 +325,8 @@ // test to ask to download DefaultArtifact artifact = new DefaultArtifact(mrid, pubdate, "mod1.1", "jar", "jar"); - DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions( - new CacheManager(_settings, _cache), true)); + DownloadReport report = resolver.download(new Artifact[] {artifact}, + new DownloadOptions(true)); assertNotNull(report); assertEquals(1, report.getArtifactsReports().length); Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/VfsResolverTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/VfsResolverTest.java?rev=607146&r1=607145&r2=607146&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/VfsResolverTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/VfsResolverTest.java Thu Dec 27 16:11:39 2007 @@ -17,9 +17,8 @@ */ package org.apache.ivy.plugins.resolver; -import junit.framework.TestCase; -public class VfsResolverTest extends TestCase { +public class VfsResolverTest extends AbstractDependencyResolverTest { VfsResolver resolver = null; public void setUp() {
