diff options
author | Olivier Lamy <olamy@apache.org> | 2013-06-09 12:44:28 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-06-09 12:44:28 +0000 |
commit | 1dba7c5b272115101992e7adc650544fb236f57b (patch) | |
tree | 306f738916a988c1d54b59d2fd5dc6f4008e968e /archiva-modules | |
parent | 1f226824a4b2cf6bbc2a0e83cd65b33513282e03 (diff) | |
download | archiva-1dba7c5b272115101992e7adc650544fb236f57b.tar.gz archiva-1dba7c5b272115101992e7adc650544fb236f57b.zip |
use fest assert to prevent issue with different collection impl
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1491204 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.java | 16 |
1 files changed, 12 insertions, 4 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 cdcf1ed59..265b457a6 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 @@ -240,15 +240,23 @@ public abstract class AbstractMetadataRepositoryTest MailingList mailingList = new MailingList(); mailingList.setName( "Foo List" ); mailingList.setOtherArchives( Collections.<String>emptyList() ); - metadata.setMailingLists( Collections.singletonList( mailingList ) ); + metadata.setMailingLists( Arrays.asList( mailingList ) ); repository.updateProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, metadata ); metadata = repository.getProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ); assertEquals( TEST_PROJECT_VERSION, metadata.getId() ); - assertEquals( 1, metadata.getMailingLists().size() ); + + List<MailingList> mailingLists = metadata.getMailingLists(); + + Assertions.assertThat( mailingLists ).isNotNull().isNotEmpty().hasSize( 1 ); + + //assertEquals( 1, metadata.getMailingLists().size() ); mailingList = metadata.getMailingLists().get( 0 ); assertEquals( "Foo List", mailingList.getName() ); - assertEquals( Collections.<String>emptyList(), mailingList.getOtherArchives() ); + + List<String> others = mailingList.getOtherArchives(); + //assertEquals( Collections.<String>emptyList(), mailingList.getOtherArchives() ); + Assertions.assertThat( others ).isNotNull().isEmpty(); } @Test @@ -540,7 +548,7 @@ public abstract class AbstractMetadataRepositoryTest testFacet = (TestMetadataFacet) metadata.getFacet( TEST_FACET_ID ); //assertFalse( testFacet.toProperties().containsKey( "deleteKey" ) ); - Map<String,String> props = testFacet.toProperties(); + Map<String, String> props = testFacet.toProperties(); Assertions.assertThat( props ).isNotNull().doesNotContainKey( "deleteKey" ); } |