From dba59dda32334ccc8e8fa39ddcf78dd968f83193 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 25 Mar 2014 06:27:26 +0000 Subject: [PATCH] improve testing git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1581249 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/AbstractMetadataRepositoryTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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 9db23c698..dd68e8038 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 @@ -267,6 +267,7 @@ public abstract class AbstractMetadataRepositoryTest metadata.setName( "project name" ); metadata.setDescription( "project description" ); + metadata.setUrl( "the url" ); MailingList mailingList = new MailingList(); mailingList.setName( "Foo List" ); @@ -317,12 +318,7 @@ public abstract class AbstractMetadataRepositoryTest assertEquals( TEST_PROJECT_VERSION, metadata.getVersion() ); assertEquals( "project name", metadata.getName() ); assertEquals( "project description", metadata.getDescription() ); - - assertEquals( 1, metadata.getMailingLists().size() ); - mailingList = metadata.getMailingLists().get( 0 ); - assertEquals( "Foo List", mailingList.getName() ); - Assertions.assertThat( mailingList.getOtherArchives() ).isNotNull().isNotEmpty().hasSize( 1 ).contains( - "other archive" ); + assertEquals( "the url", metadata.getUrl() ); assertEquals( "connection", metadata.getScm().getConnection() ); assertEquals( "dev conn", metadata.getScm().getDeveloperConnection() ); @@ -337,6 +333,12 @@ public abstract class AbstractMetadataRepositoryTest assertEquals( "org name", metadata.getOrganization().getName() ); assertEquals( "url", metadata.getOrganization().getUrl() ); + assertEquals( 1, metadata.getMailingLists().size() ); + mailingList = metadata.getMailingLists().get( 0 ); + assertEquals( "Foo List", mailingList.getName() ); + Assertions.assertThat( mailingList.getOtherArchives() ).isNotNull().isNotEmpty().hasSize( 1 ).contains( + "other archive" ); + assertEquals( 1, metadata.getLicenses().size() ); l = metadata.getLicenses().get( 0 ); assertEquals( "license name", l.getName() );