manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From piergior...@apache.org
Subject svn commit: r1209055 - /incubator/lcf/branches/CONNECTORS-287/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/APISanityIT.java
Date Thu, 01 Dec 2011 12:45:46 GMT
Author: piergiorgio
Date: Thu Dec  1 12:45:45 2011
New Revision: 1209055

URL: http://svn.apache.org/viewvc?rev=1209055&view=rev
Log:
solved all the issues on integration tests of the Alfresco Repository Connector

Modified:
    incubator/lcf/branches/CONNECTORS-287/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/APISanityIT.java

Modified: incubator/lcf/branches/CONNECTORS-287/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/APISanityIT.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-287/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/APISanityIT.java?rev=1209055&r1=1209054&r2=1209055&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-287/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/APISanityIT.java
(original)
+++ incubator/lcf/branches/CONNECTORS-287/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/APISanityIT.java
Thu Dec  1 12:45:45 2011
@@ -46,7 +46,7 @@ import org.apache.commons.lang.StringUti
 import org.apache.manifoldcf.core.interfaces.Configuration;
 import org.apache.manifoldcf.core.interfaces.ConfigurationNode;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
-import org.apache.manifoldcf.crawler.connectors.alfresco.AlfrescoRepositoryConnector;
+import org.apache.manifoldcf.crawler.connectors.alfresco.AlfrescoConfig;
 import org.apache.manifoldcf.crawler.system.ManifoldCF;
 import org.junit.After;
 import org.junit.Before;
@@ -62,9 +62,14 @@ public class APISanityIT extends Base
   private static final String ALFRESCO_TEST_QUERY_CHANGE_DOC = "PATH:\"/app:company_home/cm:testdata/*\"
AND TYPE:\"cm:content\" AND @cm\\:name:\""+REPLACER+"\"";
   private static final String ALFRESCO_TEST_QUERY = "PATH:\"/app:company_home/cm:testdata\"";
   
-  private static final String ALFRESCO_ENDPOINT_TEST_SERVER = "http://localhost:9090/alfresco/api";
   private static final String ALFRESCO_USERNAME = "admin"; 
   private static final String ALFRESCO_PASSWORD = "admin";
+  private static final String ALFRESCO_PROTOCOL = "http";
+  private static final String ALFRESCO_SERVER = "localhost";
+  private static final String ALFRESCO_PORT = "9090";
+  private static final String ALFRESCO_PATH = "/alfresco/api";
+  private static final String ALFRESCO_ENDPOINT_TEST_SERVER = 
+      ALFRESCO_PROTOCOL+"://"+ALFRESCO_SERVER+":"+ALFRESCO_PORT+ALFRESCO_PATH;
   
   private static final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
   
@@ -324,21 +329,39 @@ public class APISanityIT extends Base
       
       //username
       ConfigurationNode alfrescoUsernameNode = new ConfigurationNode("_PARAMETER_");
-      alfrescoUsernameNode.setAttribute("name", AlfrescoRepositoryConnector.CONFIG_PARAM_USERNAME);
+      alfrescoUsernameNode.setAttribute("name", AlfrescoConfig.USERNAME_PARAM);
       alfrescoUsernameNode.setValue(ALFRESCO_USERNAME);
       child.addChild(child.getChildCount(), alfrescoUsernameNode);
       
       //password
       ConfigurationNode alfrescoPasswordNode = new ConfigurationNode("_PARAMETER_");
-      alfrescoPasswordNode.setAttribute("name", AlfrescoRepositoryConnector.CONFIG_PARAM_PASSWORD);
+      alfrescoPasswordNode.setAttribute("name", AlfrescoConfig.PASSWORD_PARAM);
       alfrescoPasswordNode.setValue(ALFRESCO_PASSWORD);
       child.addChild(child.getChildCount(), alfrescoPasswordNode);
       
-      //endpoint
-      ConfigurationNode alfrescoEndpointNode = new ConfigurationNode("_PARAMETER_");
-      alfrescoEndpointNode.setAttribute("name", AlfrescoRepositoryConnector.CONFIG_PARAM_ENDPOINT);
-      alfrescoEndpointNode.setValue(ALFRESCO_ENDPOINT_TEST_SERVER);
-      child.addChild(child.getChildCount(), alfrescoEndpointNode);
+      //protocol
+      ConfigurationNode alfrescoProtocolNode = new ConfigurationNode("_PARAMETER_");
+      alfrescoProtocolNode.setAttribute("name", AlfrescoConfig.PROTOCOL_PARAM);
+      alfrescoProtocolNode.setValue(ALFRESCO_PROTOCOL);
+      child.addChild(child.getChildCount(), alfrescoProtocolNode);
+      
+      //server
+      ConfigurationNode alfrescoServerNode = new ConfigurationNode("_PARAMETER_");
+      alfrescoServerNode.setAttribute("name", AlfrescoConfig.SERVER_PARAM);
+      alfrescoServerNode.setValue(ALFRESCO_SERVER);
+      child.addChild(child.getChildCount(), alfrescoServerNode);
+      
+      //port
+      ConfigurationNode alfrescoPortNode = new ConfigurationNode("_PARAMETER_");
+      alfrescoPortNode.setAttribute("name", AlfrescoConfig.PORT_PARAM);
+      alfrescoPortNode.setValue(ALFRESCO_PORT);
+      child.addChild(child.getChildCount(), alfrescoPortNode);
+      
+      //path
+      ConfigurationNode alfrescoPathNode = new ConfigurationNode("_PARAMETER_");
+      alfrescoPathNode.setAttribute("name", AlfrescoConfig.PATH_PARAM);
+      alfrescoPathNode.setValue(ALFRESCO_PATH);
+      child.addChild(child.getChildCount(), alfrescoPathNode);
       
       connectionObject.addChild(connectionObject.getChildCount(),child);
 



Mime
View raw message