improve testing

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1581249 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2014-03-25 06:27:26 +00:00
parent ccade5dd86
commit dba59dda32
1 changed files with 8 additions and 6 deletions

View File

@ -267,6 +267,7 @@ public abstract class AbstractMetadataRepositoryTest
metadata.setName( "project name" ); metadata.setName( "project name" );
metadata.setDescription( "project description" ); metadata.setDescription( "project description" );
metadata.setUrl( "the url" );
MailingList mailingList = new MailingList(); MailingList mailingList = new MailingList();
mailingList.setName( "Foo List" ); mailingList.setName( "Foo List" );
@ -317,12 +318,7 @@ public abstract class AbstractMetadataRepositoryTest
assertEquals( TEST_PROJECT_VERSION, metadata.getVersion() ); assertEquals( TEST_PROJECT_VERSION, metadata.getVersion() );
assertEquals( "project name", metadata.getName() ); assertEquals( "project name", metadata.getName() );
assertEquals( "project description", metadata.getDescription() ); assertEquals( "project description", metadata.getDescription() );
assertEquals( "the url", metadata.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( "connection", metadata.getScm().getConnection() ); assertEquals( "connection", metadata.getScm().getConnection() );
assertEquals( "dev conn", metadata.getScm().getDeveloperConnection() ); assertEquals( "dev conn", metadata.getScm().getDeveloperConnection() );
@ -337,6 +333,12 @@ public abstract class AbstractMetadataRepositoryTest
assertEquals( "org name", metadata.getOrganization().getName() ); assertEquals( "org name", metadata.getOrganization().getName() );
assertEquals( "url", metadata.getOrganization().getUrl() ); 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() ); assertEquals( 1, metadata.getLicenses().size() );
l = metadata.getLicenses().get( 0 ); l = metadata.getLicenses().get( 0 );
assertEquals( "license name", l.getName() ); assertEquals( "license name", l.getName() );