1 package org.apache.maven.artifact.transform;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import java.util.List;
19
20 import org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformationManager;
21 import org.apache.maven.repository.legacy.resolver.transform.LatestArtifactTransformation;
22 import org.apache.maven.repository.legacy.resolver.transform.ReleaseArtifactTransformation;
23 import org.apache.maven.repository.legacy.resolver.transform.SnapshotTransformation;
24 import org.codehaus.plexus.PlexusTestCase;
25
26
27 public class TransformationManagerTest
28 extends PlexusTestCase
29 {
30 public void testTransformationManager()
31 throws Exception
32 {
33 ArtifactTransformationManager tm = lookup( ArtifactTransformationManager.class );
34
35 List tms = tm.getArtifactTransformations();
36
37 assertEquals( 3, tms.size() );
38
39 assertTrue( "We expected the release transformation and got " + tms.get(0), tms.get(0) instanceof ReleaseArtifactTransformation );
40
41 assertTrue( "We expected the latest transformation and got " + tms.get(1), tms.get(1) instanceof LatestArtifactTransformation );
42
43 assertTrue( "We expected the snapshot transformation and got " + tms.get(2), tms.get(2) instanceof SnapshotTransformation );
44 }
45
46 }