1 package org.apache.maven.artifact.installer; 2 3 18 19 import org.apache.maven.artifact.AbstractArtifactComponentTestCase; 20 import org.apache.maven.artifact.Artifact; 21 22 import java.io.File ; 23 24 28 public class ArtifactInstallerTest 29 extends AbstractArtifactComponentTestCase 30 { 31 private ArtifactInstaller artifactInstaller; 32 33 protected void setUp() 34 throws Exception 35 { 36 super.setUp(); 37 38 artifactInstaller = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE ); 39 } 40 41 protected String component() 42 { 43 return "installer"; 44 } 45 46 public void testArtifactInstallation() 47 throws Exception 48 { 49 String artifactBasedir = new File ( getBasedir(), "src/test/resources/artifact-install" ).getAbsolutePath(); 50 51 Artifact artifact = createArtifact( "artifact", "1.0" ); 52 53 File source = new File ( artifactBasedir, "artifact-1.0.jar" ); 54 55 artifactInstaller.install( source, artifact, localRepository() ); 56 57 assertLocalArtifactPresent( artifact ); 58 } 59 } | Popular Tags |