Sorry, took a shortcut on those utils, since I had them from testing the assembly plugin. I'd like to create a testing artifact that will manage mocks, and there is more in that file manager than just File.createTempFile() (it'll cleanup dangling temp files/dirs on shutdown, for one thing)...but I agree that it doesn't belong here. I just didn't want to create an external dependency until I'd had a chance to discuss where that should go (plexus?).
As for the test class for the repo metadata, it would require a separate easymock dependency to (I'm guessing) use ASM or something to allow mocking of classes, in addition to interfaces (which only require a Proxy instance). I figured that for a single test class, this was simpler than adding an entire dependency. All of this can (and should) be cleaned up, for sure. But for now, it does work. -john On 9/4/06, Brett Porter <[EMAIL PROTECTED]> wrote:
On 02/09/2006, at 1:29 AM, [EMAIL PROTECTED] wrote: > > Modified: maven/components/trunk/maven-artifact-manager/pom.xml > URL: http://svn.apache.org/viewvc/maven/components/trunk/maven- > artifact-manager/pom.xml?rev=439352&r1=439351&r2=439352&view=diff > ====================================================================== > ======== > --- maven/components/trunk/maven-artifact-manager/pom.xml (original) > +++ maven/components/trunk/maven-artifact-manager/pom.xml Fri Sep > 1 08:29:52 2006 > @@ -54,5 +54,9 @@ > <groupId>org.apache.maven.wagon</groupId> > <artifactId>wagon-provider-api</artifactId> > </dependency> > + <dependency> > + <groupId>easymock</groupId> > + <artifactId>easymock</artifactId> > + </dependency> > </dependencies> > </project> I didnt think depMgmt managed scopes? > > + private static final class TestRepoMetadata > + extends AbstractRepositoryMetadata Why was this needed when you are mocking the other things? Not sure I understand. > + > +public class MockManager I'm not sure of the value of this, but it's an interesting approach. Shouldn't it be separate to artifact-manager though? > +public class TestFileManager I don't understand this code either. For the user, this seems to be just as verbose as: File f = File.createTempFile( ... ); f.deleteOnExit(); Most of the rest seems to duplicate FileUtils code. If we're going to start assembling some test utilities, that's cool, but we should put it in shared and agreed we are going to use it consistently. One of the pitfalls of testing the current codebase is that you don't know which to use, and where (especially when it comes to plugin and integration testing) - Brett --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]