001    package org.apache.maven.artifact.transform;
002    
003    import java.util.List;
004    
005    import org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformationManager;
006    import org.apache.maven.repository.legacy.resolver.transform.LatestArtifactTransformation;
007    import org.apache.maven.repository.legacy.resolver.transform.ReleaseArtifactTransformation;
008    import org.apache.maven.repository.legacy.resolver.transform.SnapshotTransformation;
009    import org.codehaus.plexus.PlexusTestCase;
010    
011    /** @author Jason van Zyl */
012    public class TransformationManagerTest
013        extends PlexusTestCase
014    {
015        public void testTransformationManager()
016            throws Exception
017        {
018            ArtifactTransformationManager tm = (ArtifactTransformationManager) lookup( ArtifactTransformationManager.class );
019    
020            List tms = tm.getArtifactTransformations();
021    
022            assertEquals( 3, tms.size() );
023    
024            assertTrue( "We expected the release transformation and got " + tms.get(0), tms.get(0) instanceof ReleaseArtifactTransformation );
025    
026            assertTrue( "We expected the latest transformation and got " + tms.get(1), tms.get(1) instanceof LatestArtifactTransformation );
027    
028            assertTrue( "We expected the snapshot transformation and got " + tms.get(2), tms.get(2) instanceof SnapshotTransformation );
029        }
030    
031    }