aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-04-21 19:34:22 +0200
committerMartin Stockhammer <martin_s@apache.org>2020-04-21 19:34:22 +0200
commit404d6882607134cf0dca8d328718f9a41db04d37 (patch)
treeff6a6f2e6c9a928e36ec12c23bf14b453361f1d4
parent7c0b0387a3a53d8ce2677092f02046e39103be60 (diff)
downloadarchiva-404d6882607134cf0dca8d328718f9a41db04d37.tar.gz
archiva-404d6882607134cf0dca8d328718f9a41db04d37.zip
Moving to new repository content API
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java20
1 files changed, 1 insertions, 19 deletions
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java
index 7587be30d..05e45f99a 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java
@@ -44,6 +44,7 @@ import org.apache.archiva.repository.maven.MavenManagedRepository;
import org.apache.archiva.repository.maven.metadata.storage.ArtifactMappingProvider;
import org.apache.archiva.repository.storage.StorageAsset;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
import org.junit.Before;
import org.junit.Test;
@@ -182,34 +183,15 @@ public class ManagedDefaultRepositoryContentTest
private void assertVersions( String artifactId, String version, String[] expectedVersions )
throws Exception
{
- VersionedReference reference = new VersionedReference();
- reference.setGroupId( "org.apache.archiva.metadata.tests" );
- reference.setArtifactId( artifactId );
- reference.setVersion( version );
-
// Use the test metadata-repository, which is already setup for
// These kind of version tests.
Path repoDir = getRepositoryPath( "metadata-repository" );
((EditableManagedRepository)repoContent.getRepository()).setLocation( repoDir.toAbsolutePath().toUri() );
// Request the versions.
- Set<String> testedVersionSet = repoContent.getVersions( reference );
// Sort the list (for asserts later)
final VersionComparator comparator = new VersionComparator( );
- List<String> testedVersions = new ArrayList<>();
- testedVersions.addAll( testedVersionSet );
- Collections.sort( testedVersions, comparator );
-
- // Test the expected array of versions, to the actual tested versions
- assertEquals( "Assert Versions: length/size", expectedVersions.length, testedVersions.size() );
-
- for ( int i = 0; i < expectedVersions.length; i++ )
- {
- String actualVersion = testedVersions.get( i );
- assertEquals( "Versions[" + i + "]", expectedVersions[i], actualVersion );
- }
-
ItemSelector selector = ArchivaItemSelector.builder( )
.withNamespace( "org.apache.archiva.metadata.tests" )