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