add some toString for debugging purpose and avoid hard coded values to prevent test failures

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1581292 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2014-03-25 11:18:10 +00:00
parent 752e82b216
commit 8bcdb6bff6
8 changed files with 77 additions and 15 deletions

View File

@ -72,4 +72,13 @@ public class CiManagement
{
this.system = system;
}
@Override
public String toString()
{
return "CiManagement{" +
"system='" + system + '\'' +
", url='" + url + '\'' +
'}';
}
}

View File

@ -72,4 +72,12 @@ public class IssueManagement
this.system = system;
}
@Override
public String toString()
{
return "IssueManagement{" +
"system='" + system + '\'' +
", url='" + url + '\'' +
'}';
}
}

View File

@ -121,4 +121,17 @@ public class MailingList
{
return name;
}
@Override
public String toString()
{
return "MailingList{" +
"mainArchiveUrl='" + mainArchiveUrl + '\'' +
", otherArchives=" + otherArchives +
", name='" + name + '\'' +
", postAddress='" + postAddress + '\'' +
", subscribeAddress='" + subscribeAddress + '\'' +
", unsubscribeAddress='" + unsubscribeAddress + '\'' +
'}';
}
}

View File

@ -60,4 +60,13 @@ public class Organization
{
this.name = name;
}
@Override
public String toString()
{
return "Organization{" +
"name='" + name + '\'' +
", url='" + url + '\'' +
'}';
}
}

View File

@ -193,4 +193,23 @@ public class ProjectVersionMetadata
{
this.incomplete = incomplete;
}
@Override
public String toString()
{
return "ProjectVersionMetadata{" +
"id='" + id + '\'' +
", url='" + url + '\'' +
", name='" + name + '\'' +
", description='" + description + '\'' +
", organization=" + organization +
", issueManagement=" + issueManagement +
", scm=" + scm +
", ciManagement=" + ciManagement +
", licenses=" + licenses +
", mailingLists=" + mailingLists +
", dependencies=" + dependencies +
", incomplete=" + incomplete +
'}';
}
}

View File

@ -73,4 +73,14 @@ public class Scm
{
this.connection = connection;
}
@Override
public String toString()
{
return "Scm{" +
"connection='" + connection + '\'' +
", developerConnection='" + developerConnection + '\'' +
", url='" + url + '\'' +
'}';
}
}

View File

@ -77,9 +77,9 @@ public class DefaultCassandraArchivaManager
private String projectVersionMetadataFamilyName = "projectversionmetadata";
private String artifactMetadataFamilyName = "artifactmetadatamodel";
private String artifactMetadataFamilyName = "artifactmetadata";
private String metadataFacetFamilyName = "metadatafacetmodel";
private String metadataFacetFamilyName = "metadatafacet";
private String mailingListFamilyName = "mailinglist";

View File

@ -30,9 +30,6 @@ import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
@ -82,26 +79,23 @@ public class CassandraMetadataRepositoryTest
throws Exception
{
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"project" );
cassandraArchivaManager.getProjectFamilyName() );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"namespace" );
cassandraArchivaManager.getNamespaceFamilyName() );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"repository" );
cassandraArchivaManager.getRepositoryFamilyName() );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"projectversionmetadatamodel" );
cassandraArchivaManager.getProjectVersionMetadataFamilyName() );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"artifactmetadatamodel" );
cassandraArchivaManager.getArtifactMetadataFamilyName() );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"metadatafacetmodel" );
cassandraArchivaManager.getMetadataFacetFamilyName() );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"metadatafacetmodel" );
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"mailinglist" );
cassandraArchivaManager.getMailingListFamilyName() );
}