aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-06-03 12:14:54 +0000
committerOlivier Lamy <olamy@apache.org>2013-06-03 12:14:54 +0000
commitdd314fde032b5e002c332d24cae0eea4ca536364 (patch)
tree6efac64739fb12986f4c83daa46f95cfbcab1f24 /archiva-modules
parenta4f3b7be2baba1571ba6d6e1f5c8a336372b245a (diff)
downloadarchiva-dd314fde032b5e002c332d24cae0eea4ca536364.tar.gz
archiva-dd314fde032b5e002c332d24cae0eea4ca536364.zip
prevent issues when returned collection do not have the same type
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1488971 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
index 1bdc6cf8f..145580577 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
@@ -55,8 +55,8 @@ import java.util.List;
import java.util.Map;
import java.util.TimeZone;
-@RunWith(ArchivaSpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" })
+@RunWith( ArchivaSpringJUnit4ClassRunner.class )
+@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } )
public abstract class AbstractMetadataRepositoryTest
extends TestCase
{
@@ -1050,11 +1050,13 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateProjectVersion( TEST_REPO_ID, "org.apache.maven." + TEST_PROJECT, "other-project",
versionMetadata );
- List<String> expectedVersions = Collections.singletonList( TEST_PROJECT_VERSION );
- assertEquals( expectedVersions, repository.getProjectVersions( TEST_REPO_ID, "org.apache.maven." + TEST_PROJECT,
- "other-project" ) );
- assertEquals( expectedVersions,
- repository.getProjectVersions( TEST_REPO_ID, "org.apache.maven", TEST_PROJECT ) );
+ Collection<String> versions =
+ repository.getProjectVersions( TEST_REPO_ID, "org.apache.maven." + TEST_PROJECT, "other-project" );
+ Assertions.assertThat( versions ).isNotNull().isNotEmpty().contains( TEST_PROJECT_VERSION );
+
+ versions = repository.getProjectVersions( TEST_REPO_ID, "org.apache.maven", TEST_PROJECT );
+
+ Assertions.assertThat( versions ).isNotNull().isNotEmpty().contains( TEST_PROJECT_VERSION );
}
@Test