]> source.dussan.org Git - archiva.git/commitdiff
remove old tests that are not required of the code
authorBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 08:21:22 +0000 (08:21 +0000)
committerBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 08:21:22 +0000 (08:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437125 13f79535-47bb-0310-9956-ffa450edef68

archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/AbstractRepositoryReportsTestCase.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/ChecksumArtifactReporterTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/InvalidPomArtifactReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/LocationArtifactReportProcessorTest.java

index f56d82e94ee4cb3aea39ffc634b70ced30fe16b3..9c88157fd972cc80a4b04b88dbb59f0cf08406da 100644 (file)
@@ -34,20 +34,6 @@ public abstract class AbstractRepositoryReportsTestCase
      */
     protected ArtifactRepository repository;
 
-    protected static final String remoteRepoUrl = "http://public.planetmirror.com/pub/maven2/";
-
-    protected static final String remoteArtifactGroup = "HTTPClient";
-
-    protected static final String remoteArtifactId = "HTTPClient";
-
-    protected static final String remoteArtifactVersion = "0.3-3";
-
-    protected static final String remoteArtifactScope = "compile";
-
-    protected static final String remoteArtifactType = "jar";
-
-    protected static final String remoteRepoId = "remote-repo";
-
     protected void setUp()
         throws Exception
     {
index 1cc7d12dd78ed6f8dd2362437f1e0599df2172bc..7b28f601405d5e74ed1e31d8a2c08c921f476bfc 100644 (file)
@@ -135,62 +135,6 @@ public class ChecksumArtifactReporterTest
         assertTrue( "check if there is a failure", iter.hasNext() );
     }
 
-    /**
-     * Test the checksum of an artifact located in a remote location.
-     */
-    /*   public void testChecksumArtifactRemote()
-    {
-        ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType );
-        VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
-        Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version, remoteArtifactScope,
-                                                 remoteArtifactType, "", handler );
-        ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
-                                                                       new DefaultRepositoryLayout() );
-
-        artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        if ( reporter.getFailures() == 2 )
-            assertTrue( reporter.getFailures() == 2 );
-
-        if ( reporter.getSuccesses() == 2 )
-            assertTrue( reporter.getSuccesses() == 2 );
-
-    }
-    */
-
-    /**
-     * Test the checksum of a metadata file located in a remote location.
-     */
-    /*   public void testChecksumMetadataRemote()
-    {
-
-        try
-        {
-            ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType );
-            VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
-            Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version,
-                                                     remoteArtifactScope, remoteArtifactType, "", handler );
-            ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
-                                                                           new DefaultRepositoryLayout() );
-
-            RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact );
-
-            metadataReportProcessor.processMetadata( metadata, repository, reporter );
-            Iterator iter = reporter.getRepositoryMetadataFailureIterator();
-            if ( iter.hasNext() )
-                assertTrue( "check if there is a failure", iter.hasNext() );
-
-            iter = reporter.getRepositoryMetadataSuccessIterator();
-            if ( iter.hasNext() )
-                assertTrue( "check if there is a success", iter.hasNext() );
-
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-        }
-    }
-    */
-
     /**
      * Test the conditional when the checksum files of the artifact & metadata do not exist.
      */
index fd1fe91b33e69d8c3f90b70388f78fa37f77ba61..40fc565b3bbb91765b2134ec8a6c668239f10fe8 100644 (file)
@@ -83,27 +83,4 @@ public class InvalidPomArtifactReportProcessorTest
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
         assertEquals( 1, reporter.getWarnings() );
     }
-
-    /**
-     * Test the InvalidPomArtifactReportProcessor when the pom is located in 
-     * a remote repository.
-     */
-    /* public void testRemotePomArtifactReportProcessorSuccess(){
-        try{
-            ArtifactHandler handler = new DefaultArtifactHandler( "pom" );
-            VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
-            Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version, remoteArtifactScope,
-                                                     "pom", "", handler );
-            ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
-                                                                           new DefaultRepositoryLayout() );
-        
-            artifactReportProcessor.processArtifact(null, artifact, reporter, repository);
-            if(reporter.getSuccesses() == 1)
-                assertTrue(reporter.getSuccesses() == 1);
-                        
-        }catch(Exception e){
-            
-        }
-    }
-    */
 }
index ddd83a7a257309e87ce92ddcbda89af67b0f882e..f1acef97edcf4361e2f210a756b562bb9835f701 100644 (file)
@@ -186,39 +186,4 @@ public class LocationArtifactReportProcessorTest
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
         assertEquals( 1, reporter.getFailures() );
     }
-
-    /**
-     * Test the LocationArtifactReportProcessor when the artifact is located in the remote repository.
-     */
-    /*  public void testRemoteArtifactReportProcessorFailure()
-    {
-
-        ArtifactHandler handler = new DefaultArtifactHandler( remoteArtifactType );
-        VersionRange version = VersionRange.createFromVersion( remoteArtifactVersion );
-        Artifact artifact = new DefaultArtifact( remoteArtifactGroup, remoteArtifactId, version, remoteArtifactScope,
-                                                 remoteArtifactType, "", handler );
-        ArtifactRepository repository = new DefaultArtifactRepository( remoteRepoId, remoteRepoUrl,
-                                                                       new DefaultRepositoryLayout() );
-        try
-        {
-            URL url = new URL( remoteRepoUrl + remoteArtifactGroup + "/" + remoteArtifactId + "/"
-                + remoteArtifactVersion + "/" + remoteArtifactId + "-" + remoteArtifactVersion + ".pom" );
-            InputStream is = url.openStream();
-            Reader reader = new InputStreamReader( is );
-            Model model = pomReader.read( reader );
-
-            artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-            if ( reporter.getFailures() > 0 )
-                assertTrue( reporter.getFailures() == 1 );
-
-            if ( reporter.getSuccesses() > 0 )
-                assertTrue( reporter.getSuccesses() == 1 );
-
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-        }
-    }
-    */
 }