From 278a61c8c296aa51bf0aad5fbadf7970fee1b4ff Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 5 Jun 2013 12:40:22 +0000 Subject: use fest assert git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1489838 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/AbstractMetadataRepositoryTest.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'archiva-modules') 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 d3ab7eb92..07c20ce39 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 @@ -1004,10 +1004,22 @@ public abstract class AbstractMetadataRepositoryTest { repository.updateNamespace( TEST_REPO_ID, "org.apache.maven.shared" ); - assertEquals( Arrays.asList( "org" ), repository.getRootNamespaces( TEST_REPO_ID ) ); - assertEquals( Arrays.asList( "apache" ), repository.getNamespaces( TEST_REPO_ID, "org" ) ); - assertEquals( Arrays.asList( "maven" ), repository.getNamespaces( TEST_REPO_ID, "org.apache" ) ); - assertEquals( Arrays.asList( "shared" ), repository.getNamespaces( TEST_REPO_ID, "org.apache.maven" ) ); + Collection namespaces = repository.getRootNamespaces( TEST_REPO_ID ); + + //assertEquals( Arrays.asList( "org" ), repository.getRootNamespaces( TEST_REPO_ID ) ); + Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "org" ); + + //assertEquals( Arrays.asList( "apache" ), repository.getNamespaces( TEST_REPO_ID, "org" ) ); + namespaces = repository.getNamespaces( TEST_REPO_ID, "org" ); + Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "org" ); + + //assertEquals( Arrays.asList( "maven" ), repository.getNamespaces( TEST_REPO_ID, "org.apache" ) ); + namespaces = repository.getNamespaces( TEST_REPO_ID, "org.apache" ); + Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "maven" ); + + //assertEquals( Arrays.asList( "shared" ), repository.getNamespaces( TEST_REPO_ID, "org.apache.maven" ) ); + namespaces = repository.getNamespaces( TEST_REPO_ID, "org.apache.maven" ); + Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "shared" ); } @Test -- cgit v1.2.3