]> source.dussan.org Git - archiva.git/commitdiff
add some toString for debugging purpose and avoid hard coded values to prevent test...
authorOlivier Lamy <olamy@apache.org>
Tue, 25 Mar 2014 11:18:10 +0000 (11:18 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 25 Mar 2014 11:18:10 +0000 (11:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1581292 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java
archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java
archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java
archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java
archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java
archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/DefaultCassandraArchivaManager.java
archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java

index 27f87c860ddf76f64f1e1bf9e1374b4600535b39..18705d209feda8325abafc7f0b2c5faa4376bc6c 100644 (file)
@@ -72,4 +72,13 @@ public class CiManagement
     {
         this.system = system;
     }
+
+    @Override
+    public String toString()
+    {
+        return "CiManagement{" +
+            "system='" + system + '\'' +
+            ", url='" + url + '\'' +
+            '}';
+    }
 }
index 214b1c66617c103d56f3360989f9f33786048ce1..c84af362ab8c8813943a37d962d6633243bb3956 100644 (file)
@@ -72,4 +72,12 @@ public class IssueManagement
         this.system = system;
     }
 
+    @Override
+    public String toString()
+    {
+        return "IssueManagement{" +
+            "system='" + system + '\'' +
+            ", url='" + url + '\'' +
+            '}';
+    }
 }
index 1e56af847c573b71041506280d2be0ad224da993..0297ebf8b741443c0eed87a8db29919b10365992 100644 (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 + '\'' +
+            '}';
+    }
 }
index 932c2f6675730b45879676337bd1f1e68e0ff044..d59cc8491712bc1912a5f91c401acbadd9c46914 100644 (file)
@@ -60,4 +60,13 @@ public class Organization
     {
         this.name = name;
     }
+
+    @Override
+    public String toString()
+    {
+        return "Organization{" +
+            "name='" + name + '\'' +
+            ", url='" + url + '\'' +
+            '}';
+    }
 }
index 015c10d0586f5852880e9ea49696933210f80ff5..9fad3857e8b3ae76f93833c7cdd133e9c6055bd5 100644 (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 +
+            '}';
+    }
 }
index 9751d89e0cec9f97c552a9e4c141f1a8cb9d38bc..a091860c713cc2eb21bfc78e532ac77d4d4aa72c 100644 (file)
@@ -73,4 +73,14 @@ public class Scm
     {
         this.connection = connection;
     }
+
+    @Override
+    public String toString()
+    {
+        return "Scm{" +
+            "connection='" + connection + '\'' +
+            ", developerConnection='" + developerConnection + '\'' +
+            ", url='" + url + '\'' +
+            '}';
+    }
 }
index c18885c6ffa99e1a711bd9a3df91919574d07098..b8eedac792767342edeec26d5a47fd462c6cd221 100644 (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";
 
index 275c0954528e3e403aa9df3bceacf0d133712546..2e96177d65cedc502592b6ad7af95b9d5f07ff1d 100644 (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() );
 
     }