chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1235671 [3/3] - in /chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/ chemistry-opencmis-client/chemistry-opencmis-client-binding...
Date Wed, 25 Jan 2012 07:58:27 GMT
Added: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/misc/ReadOnlyCreateSessionBrowserIT.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/misc/ReadOnlyCreateSessionBrowserIT.java?rev=1235671&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/misc/ReadOnlyCreateSessionBrowserIT.java
(added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/misc/ReadOnlyCreateSessionBrowserIT.java
Wed Jan 25 07:58:25 2012
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.fit.runtime.misc;
+
+import org.apache.chemistry.opencmis.fit.runtime.Fixture;
+
+/**
+ * Independent session creation test (read only)
+ */
+public class ReadOnlyCreateSessionBrowserIT extends AbstractReadOnlyCreateSessionIT {
+
+    protected void init() {
+        this.fixture = new Fixture();
+        this.fixture.enableBrowser();
+        this.fixture.init();
+    }
+
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/misc/ReadOnlyCreateSessionBrowserIT.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/AtomPubSampleIT.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/AtomPubSampleIT.java?rev=1235671&r1=1235670&r2=1235671&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/AtomPubSampleIT.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/AtomPubSampleIT.java
Wed Jan 25 07:58:25 2012
@@ -23,9 +23,6 @@ import org.apache.chemistry.opencmis.fit
 
 /**
  * AtomPub sample test.
- * 
- * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- * 
  */
 public class AtomPubSampleIT extends AbstractSampleIT {
 

Added: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/BrowserSampleIT.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/BrowserSampleIT.java?rev=1235671&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/BrowserSampleIT.java
(added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/BrowserSampleIT.java
Wed Jan 25 07:58:25 2012
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.fit.sample;
+
+import org.apache.chemistry.opencmis.client.api.Session;
+import org.apache.chemistry.opencmis.fit.SessionFactory;
+
+/**
+ * AtomPub sample test.
+ */
+public class BrowserSampleIT extends AbstractSampleIT {
+
+    @Override
+    protected Session createSession() {
+        return SessionFactory.createBrowserSession();
+    }
+
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/BrowserSampleIT.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/WebServicesSampleIT.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/WebServicesSampleIT.java?rev=1235671&r1=1235670&r2=1235671&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/WebServicesSampleIT.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/sample/WebServicesSampleIT.java
Wed Jan 25 07:58:25 2012
@@ -23,9 +23,6 @@ import org.apache.chemistry.opencmis.fit
 
 /**
  * Web Services sample test.
- * 
- * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- * 
  */
 public class WebServicesSampleIT extends AbstractSampleIT {
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.atom.properties
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.atom.properties?rev=1235671&r1=1235670&r2=1235671&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.atom.properties
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.atom.properties
Wed Jan 25 07:58:25 2012
@@ -26,11 +26,6 @@ org.apache.chemistry.opencmis.binding.sp
 
 org.apache.chemistry.opencmis.binding.atompub.url=http://localhost:19080/opencmis/atom
 
-org.apache.chemistry.opencmis.locale.iso639=de 
-org.apache.chemistry.opencmis.locale.iso3166= 
-org.apache.chemistry.opencmis.locale.variant= 
-
-org.apache.chemistry.opencmis.session.type=persistent
 org.apache.chemistry.opencmis.session.repository.id=test
 
 org.apache.chemistry.opencmis.fit.runtime.document.type.id=cmis:document

Added: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.browser.properties
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.browser.properties?rev=1235671&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.browser.properties
(added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.browser.properties
Wed Jan 25 07:58:25 2012
@@ -0,0 +1,38 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+org.apache.chemistry.opencmis.user=test
+org.apache.chemistry.opencmis.password=test
+
+org.apache.chemistry.opencmis.binding.spi.type=browser
+
+org.apache.chemistry.opencmis.binding.browser.url=http://localhost:19080/opencmis/browser
+
+org.apache.chemistry.opencmis.session.repository.id=test
+
+org.apache.chemistry.opencmis.fit.runtime.document.type.id=cmis:document
+org.apache.chemistry.opencmis.fit.runtime.folder.type.id=cmis:folder
+
+org.apache.chemistry.opencmis.fit.runtime.document1.name=My_Document-0-0
+org.apache.chemistry.opencmis.fit.runtime.document2.name=My_Document-0-1
+org.apache.chemistry.opencmis.fit.runtime.folder1.name=My_Folder-0-0
+org.apache.chemistry.opencmis.fit.runtime.folder2.name=My_Folder-0-1
+

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.browser.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.ws.properties
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.ws.properties?rev=1235671&r1=1235670&r2=1235671&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.ws.properties
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/resources/inmemory.ws.properties
Wed Jan 25 07:58:25 2012
@@ -34,11 +34,6 @@ org.apache.chemistry.opencmis.binding.we
 org.apache.chemistry.opencmis.binding.webservices.PolicyService=http://localhost:19080/opencmis/services/PolicyService?wsdl
 org.apache.chemistry.opencmis.binding.webservices.ACLService=http://localhost:19080/opencmis/services/ACLService?wsdl
 
-org.apache.chemistry.opencmis.locale.iso639=de 
-org.apache.chemistry.opencmis.locale.iso3166= 
-org.apache.chemistry.opencmis.locale.variant= 
-
-org.apache.chemistry.opencmis.session.type=persistent
 org.apache.chemistry.opencmis.session.repository.id=test
 
 org.apache.chemistry.opencmis.fit.runtime.document.type.id=cmis:document

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java?rev=1235671&r1=1235670&r2=1235671&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
Wed Jan 25 07:58:25 2012
@@ -37,116 +37,130 @@ import org.apache.chemistry.opencmis.tck
  */
 public class CreateAndDeleteRelationshipTest extends AbstractSessionTest {
 
-    @Override
-    public void init(Map<String, String> parameters) {
-        super.init(parameters);
-        setName("Create and Delete Relationship Test");
-        setDescription("Creates a relationship between two documents, checks the newly created
relationship finally deletes the created relationship.");
-    }
-
-    @Override
-    public void run(Session session) {
-        CmisTestResult f;
-        boolean found;
-
-        if (hasRelationships(session)) {
-            // create a test folder
-            Folder testFolder = createTestFolder(session);
-
-            try {
-                // create documents
-                Document doc1 = createDocument(session, testFolder, "doc1.txt", "doc1");
-                Document doc2 = createDocument(session, testFolder, "doc2.txt", "doc2");
-
-                // create relationship
-                Relationship rel = createRelationship(session, "rel1", doc1, doc2);
-
-                f = createResult(FAILURE, "Source document id does not match relationship
source id!");
-                addResult(assertEquals(doc1.getId(), rel.getSourceId().getId(), null, f));
-
-                f = createResult(FAILURE, "Target document id does not match relationship
target id!");
-                addResult(assertEquals(doc2.getId(), rel.getTarget().getId(), null, f));
-
-                // check the source document
-                doc1.refresh();
-                List<Relationship> doc1rels = doc1.getRelationships();
-
-                f = createResult(FAILURE, "Source document has no relationships but must
have at least one!");
-                addResult(assertListNotEmpty(doc1rels, null, f));
-
-                if (doc1rels != null) {
-                    found = false;
-                    for (Relationship r : doc1rels) {
-                        if (rel.getId().equals(r.getId())) {
-                            found = true;
-                            break;
-                        }
-                    }
-
-                    f = createResult(FAILURE,
-                            "Newly created relationship not found in the relationships of
the source document!");
-                    addResult(assertIsTrue(found, null, f));
-                }
-
-                found = false;
-                for (Relationship r : session.getRelationships(doc1, true, RelationshipDirection.SOURCE,
null,
-                        SELECT_ALL_NO_CACHE_OC)) {
-                    if (rel.getId().equals(r.getId())) {
-                        found = true;
-                        break;
-                    }
-                }
-
-                f = createResult(
-                        FAILURE,
-                        "Newly created relationship not found in the relationships returned
by getObjectRelationships() for the source document!");
-                addResult(assertIsTrue(found, null, f));
-
-                // check the target document
-                doc2.refresh();
-                List<Relationship> doc2rels = doc2.getRelationships();
-
-                f = createResult(FAILURE, "Target document has no relationships but must
have at least one!");
-                addResult(assertListNotEmpty(doc2rels, null, f));
-
-                if (doc2rels != null) {
-                    found = false;
-                    for (Relationship r : doc2rels) {
-                        if (rel.getId().equals(r.getId())) {
-                            found = true;
-                            break;
-                        }
-                    }
-
-                    f = createResult(FAILURE,
-                            "Newly created relationship not found in the relationships of
the target document!");
-                    addResult(assertIsTrue(found, null, f));
-                }
-
-                found = false;
-                for (Relationship r : session.getRelationships(doc2, true, RelationshipDirection.TARGET,
null,
-                        SELECT_ALL_NO_CACHE_OC)) {
-                    if (rel.getId().equals(r.getId())) {
-                        found = true;
-                        break;
-                    }
-                }
-
-                f = createResult(
-                        FAILURE,
-                        "Newly created relationship not found in the relationships returned
by getObjectRelationships() for the target document!");
-                addResult(assertIsTrue(found, null, f));
-
-                // remove
-                deleteObject(rel);
-                deleteObject(doc2);
-                deleteObject(doc1);
-            } finally {
-                // delete the test folder
-                deleteTestFolder();
-            }
-        } else {
-            addResult(createResult(SKIPPED, "Relationships not supported. Test Skipped!"));
-        }
-    }
+	@Override
+	public void init(Map<String, String> parameters) {
+		super.init(parameters);
+		setName("Create and Delete Relationship Test");
+		setDescription("Creates a relationship between two documents, checks the newly created
relationship and finally deletes the created relationship.");
+	}
+
+	@Override
+	public void run(Session session) {
+		CmisTestResult f;
+		boolean found;
+
+		if (hasRelationships(session)) {
+			// create a test folder
+			Folder testFolder = createTestFolder(session);
+
+			try {
+				// create documents
+				Document doc1 = createDocument(session, testFolder, "doc1.txt",
+						"doc1");
+				Document doc2 = createDocument(session, testFolder, "doc2.txt",
+						"doc2");
+
+				// create relationship
+				Relationship rel = createRelationship(session, "rel1", doc1,
+						doc2);
+
+				f = createResult(FAILURE,
+						"Source document id does not match relationship source id!");
+				addResult(assertEquals(doc1.getId(), rel.getSourceId().getId(),
+						null, f));
+
+				f = createResult(FAILURE,
+						"Target document id does not match relationship target id!");
+				addResult(assertEquals(doc2.getId(), rel.getTarget().getId(),
+						null, f));
+
+				// check the source document
+				doc1.refresh();
+				List<Relationship> doc1rels = doc1.getRelationships();
+
+				f = createResult(FAILURE,
+						"Source document has no relationships but must have at least one!");
+				addResult(assertListNotEmpty(doc1rels, null, f));
+
+				if (doc1rels != null) {
+					found = false;
+					for (Relationship r : doc1rels) {
+						if (rel.getId().equals(r.getId())) {
+							found = true;
+							break;
+						}
+					}
+
+					f = createResult(
+							FAILURE,
+							"Newly created relationship not found in the relationships of the source document!");
+					addResult(assertIsTrue(found, null, f));
+				}
+
+				found = false;
+				for (Relationship r : session.getRelationships(doc1, true,
+						RelationshipDirection.SOURCE, null,
+						SELECT_ALL_NO_CACHE_OC)) {
+					if (rel.getId().equals(r.getId())) {
+						found = true;
+						break;
+					}
+				}
+
+				f = createResult(
+						FAILURE,
+						"Newly created relationship not found in the relationships returned by getObjectRelationships()
for the source document!");
+				addResult(assertIsTrue(found, null, f));
+
+				// check the target document
+				doc2.refresh();
+				List<Relationship> doc2rels = doc2.getRelationships();
+
+				f = createResult(FAILURE,
+						"Target document has no relationships but must have at least one!");
+				addResult(assertListNotEmpty(doc2rels, null, f));
+
+				if (doc2rels != null) {
+					found = false;
+					for (Relationship r : doc2rels) {
+						if (rel.getId().equals(r.getId())) {
+							found = true;
+							break;
+						}
+					}
+
+					f = createResult(
+							FAILURE,
+							"Newly created relationship not found in the relationships of the target document!");
+					addResult(assertIsTrue(found, null, f));
+				}
+
+				found = false;
+				for (Relationship r : session.getRelationships(doc2, true,
+						RelationshipDirection.TARGET, null,
+						SELECT_ALL_NO_CACHE_OC)) {
+					if (rel.getId().equals(r.getId())) {
+						found = true;
+						break;
+					}
+				}
+
+				f = createResult(
+						FAILURE,
+						"Newly created relationship not found in the relationships returned by getObjectRelationships()
for the target document!");
+				addResult(assertIsTrue(found, null, f));
+
+				// remove
+				deleteObject(rel);
+				deleteObject(doc2);
+				deleteObject(doc1);
+			} finally {
+				// delete the test folder
+				deleteTestFolder();
+			}
+		} else {
+			addResult(createResult(SKIPPED,
+					"Relationships not supported. Test Skipped!"));
+		}
+	}
 }



Mime
View raw message