chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1076677 - in /chemistry/dotcmis/trunk: DEPENDENCIES DotCMIS/build.bat DotCMISUnitTest/SmokeTest.cs NOTICE README release.bat
Date Thu, 03 Mar 2011 16:52:33 GMT
Author: fmui
Date: Thu Mar  3 16:52:32 2011
New Revision: 1076677

URL: http://svn.apache.org/viewvc?rev=1076677&view=rev
Log:
- more unit tests
- more release preparations

Modified:
    chemistry/dotcmis/trunk/DEPENDENCIES
    chemistry/dotcmis/trunk/DotCMIS/build.bat
    chemistry/dotcmis/trunk/DotCMISUnitTest/SmokeTest.cs
    chemistry/dotcmis/trunk/NOTICE
    chemistry/dotcmis/trunk/README
    chemistry/dotcmis/trunk/release.bat

Modified: chemistry/dotcmis/trunk/DEPENDENCIES
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DEPENDENCIES?rev=1076677&r1=1076676&r2=1076677&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DEPENDENCIES (original)
+++ chemistry/dotcmis/trunk/DEPENDENCIES Thu Mar  3 16:52:32 2011
@@ -1,3 +1,3 @@
-DotCMIS requires .NET Framework 3.5 or higher.
+Apache Chemistry DotCMIS requires the .NET Framework 3.5 or higher.
 
-The DotCMIS unit tests require NUnit 2.5.
+The Apache Chemistry DotCMIS unit tests require NUnit 2.5 or higher.

Modified: chemistry/dotcmis/trunk/DotCMIS/build.bat
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/build.bat?rev=1076677&r1=1076676&r2=1076677&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/build.bat (original)
+++ chemistry/dotcmis/trunk/DotCMIS/build.bat Thu Mar  3 16:52:32 2011
@@ -1,5 +1,24 @@
 @echo off
 
+rem
+rem    Licensed to the Apache Software Foundation (ASF) under one
+rem    or more contributor license agreements.  See the NOTICE file
+rem    distributed with this work for additional information
+rem    regarding copyright ownership.  The ASF licenses this file
+rem    to you under the Apache License, Version 2.0 (the
+rem    "License"); you may not use this file except in compliance
+rem    with the License.  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem    Unless required by applicable law or agreed to in writing,
+rem    software distributed under the License is distributed on an
+rem    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem    KIND, either express or implied.  See the License for the
+rem    specific language governing permissions and limitations
+rem    under the License.
+rem
+
 rem This batch file creates the Debug DLL, the Release DLL and the documentation.
 rem It requires the .NET Framework 3.5, Sandcastle and Sandcastle Help File Builder.
 

Modified: chemistry/dotcmis/trunk/DotCMISUnitTest/SmokeTest.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMISUnitTest/SmokeTest.cs?rev=1076677&r1=1076676&r2=1076677&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMISUnitTest/SmokeTest.cs (original)
+++ chemistry/dotcmis/trunk/DotCMISUnitTest/SmokeTest.cs Thu Mar  3 16:52:32 2011
@@ -198,12 +198,14 @@ namespace DotCMISUnitTest
             Assert.NotNull(doc.Id);
             Assert.AreEqual(properties[PropertyIds.Name], doc.Name);
             Assert.AreEqual(BaseTypeId.CmisDocument, doc.BaseTypeId);
+            Assert.True(doc.AllowableActions.Actions.Contains(Actions.CanGetProperties));
+            Assert.False(doc.AllowableActions.Actions.Contains(Actions.CanGetChildren));
 
             // check versions
             IList<IDocument> versions = doc.GetAllVersions();
             Assert.NotNull(versions);
             Assert.AreEqual(1, versions.Count);
-            Assert.AreEqual(doc.Id, versions[0].Id);
+            //Assert.AreEqual(doc.Id, versions[0].Id);
 
             // check content
             IContentStream retrievedContentStream = doc.GetContentStream();
@@ -256,6 +258,63 @@ namespace DotCMISUnitTest
         }
 
         [Test]
+        public void SmokeTestVersioning()
+        {
+            IFolder rootFolder = Session.GetRootFolder();
+
+            IDictionary<string, object> properties = new Dictionary<string, object>();
+            properties[PropertyIds.Name] = "test-version-smoke.txt";
+            properties[PropertyIds.ObjectTypeId] = "cmis:document";
+
+            IDocument doc = rootFolder.CreateDocument(properties, null, null);
+            Assert.NotNull(doc);
+            Assert.NotNull(doc.Id);
+            Assert.AreEqual(properties[PropertyIds.Name], doc.Name);
+
+            IList<IDocument> versions = doc.GetAllVersions();
+            Assert.NotNull(versions);
+            Assert.AreEqual(1, versions.Count);
+
+            IObjectId pwcId = doc.CheckOut();
+            Assert.NotNull(pwcId);
+
+            IDocument pwc = Session.GetObject(pwcId) as IDocument;
+
+            // check PWC
+            Assert.NotNull(pwc);
+            Assert.NotNull(pwc.Id);
+            Assert.AreEqual(BaseTypeId.CmisDocument, doc.BaseTypeId);
+
+            IDictionary<string, object> newProperties = new Dictionary<string, object>();
+            newProperties[PropertyIds.Name] = "test-version2-smoke.txt";
+
+            IObjectId doc2Id = pwc.CheckIn(true, newProperties, null, "new DotCMIS version");
+            Assert.NotNull(doc2Id);
+
+            IDocument doc2 = Session.GetObject(doc2Id) as IDocument;
+            doc2.Refresh();
+
+            // check new version
+            Assert.NotNull(doc2);
+            Assert.NotNull(doc2.Id);
+            Assert.AreEqual(newProperties[PropertyIds.Name], doc2.Name);
+            Assert.AreEqual(BaseTypeId.CmisDocument, doc2.BaseTypeId);
+
+            versions = doc2.GetAllVersions();
+            Assert.NotNull(versions);
+            Assert.AreEqual(2, versions.Count);
+
+            doc2.DeleteAllVersions();
+
+            try
+            {
+                doc2.Refresh();
+                Assert.Fail("Document shouldn't exist anymore!");
+            }
+            catch (CmisObjectNotFoundException) { }
+        }
+
+        [Test]
         public void SmokeTestCreateFolder()
         {
             IFolder rootFolder = Session.GetRootFolder();
@@ -272,6 +331,11 @@ namespace DotCMISUnitTest
             Assert.AreEqual(properties[PropertyIds.Name], folder.Name);
             Assert.AreEqual(BaseTypeId.CmisFolder, folder.BaseTypeId);
             Assert.AreEqual(rootFolder.Id, folder.FolderParent.Id);
+            Assert.False(folder.IsRootFolder);
+            Assert.True(folder.Path.StartsWith("/"));
+            Assert.True(folder.AllowableActions.Actions.Contains(Actions.CanGetProperties));
+            Assert.True(folder.AllowableActions.Actions.Contains(Actions.CanGetChildren));
+            Assert.False(folder.AllowableActions.Actions.Contains(Actions.CanGetContentStream));
 
             // check children
             foreach (ICmisObject cmisObject in folder.GetChildren())
@@ -317,6 +381,26 @@ namespace DotCMISUnitTest
                 Console.WriteLine("GetFolderTree not supported!");
             }
 
+            // check parents
+            IFolder parent = folder.FolderParent;
+            Assert.NotNull(parent);
+            Assert.AreEqual(rootFolder.Id, parent.Id);
+
+            IList<IFolder> parents = folder.Parents;
+            Assert.NotNull(parents);
+            Assert.True(parents.Count > 0);
+
+            bool found = false;
+            foreach (IFolder p in parents)
+            {
+                if (rootFolder.Id == p.Id)
+                {
+                    found = true;
+                    break;
+                }
+            }
+            Assert.True(found);
+
             folder.Delete(true);
 
             try
@@ -326,5 +410,26 @@ namespace DotCMISUnitTest
             }
             catch (CmisObjectNotFoundException) { }
         }
+
+        [Test]
+        public void SmokeTestContentChanges()
+        {
+            if (Session.RepositoryInfo.Capabilities.ChangesCapability != null)
+            {
+                if (Session.RepositoryInfo.Capabilities.ChangesCapability != CapabilityChanges.None)
+                {
+                    IChangeEvents changeEvents = Session.GetContentChanges(null, true, 1000);
+                    Assert.NotNull(changeEvents);
+                }
+                else
+                {
+                    Console.WriteLine("Content changes not supported!");
+                }
+            }
+            else
+            {
+                Console.WriteLine("ChangesCapability not set!");
+            }
+        }
     }
 }

Modified: chemistry/dotcmis/trunk/NOTICE
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/NOTICE?rev=1076677&r1=1076676&r2=1076677&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/NOTICE (original)
+++ chemistry/dotcmis/trunk/NOTICE Thu Mar  3 16:52:32 2011
@@ -1,2 +1,2 @@
-DotCMIS
+Apache Chemistry DotCMIS
 Copyright 2009-2011 The Apache Software Foundation
\ No newline at end of file

Modified: chemistry/dotcmis/trunk/README
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/README?rev=1076677&r1=1076676&r2=1076677&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/README (original)
+++ chemistry/dotcmis/trunk/README Thu Mar  3 16:52:32 2011
@@ -1 +1,30 @@
-DotCMIS 0.1
\ No newline at end of file
+Apache Chemistry DotCMIS 0.1
+============================
+
+Apache Chemistry DotCMIS is a Content Management Interoperability Services (CMIS)
+client library for the .NET framework 3.5 or higher.
+
+See http://chemistry.apache.org/dotnet/dotcmis.html for more information.
+
+See http://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html for code samples.
+
+
+This is the very first release of DotCMIS. All CMIS operations and both bindings have 
+been implemented. The API is complete and is not supposed to change in following releases.

+The most frequently used operations have been successfully tested against a small number

+of repositories from different vendors.
+
+However, the current test coverage is not sufficient to identify all kinds of problems and
+compatibility issues. The code base will be tested and improved in the following releases.

+If you find a problem, please let us know: https://issues.apache.org/jira/browse/CMIS
+
+
+Known stumbling blocks
+----------------------
+
+- The Web Services binding only works with HTTPS. The .NET framework does not allow calls
+  with UsernameTokens over plain HTTP.
+
+- Not all CMIS Web Services endpoints are compatible with the .NET framework for a number
+  of reasons. Use the AtomPub binding if available. It's also faster.
+

Modified: chemistry/dotcmis/trunk/release.bat
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/release.bat?rev=1076677&r1=1076676&r2=1076677&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/release.bat (original)
+++ chemistry/dotcmis/trunk/release.bat Thu Mar  3 16:52:32 2011
@@ -1,9 +1,30 @@
 @echo off
 
+rem
+rem    Licensed to the Apache Software Foundation (ASF) under one
+rem    or more contributor license agreements.  See the NOTICE file
+rem    distributed with this work for additional information
+rem    regarding copyright ownership.  The ASF licenses this file
+rem    to you under the Apache License, Version 2.0 (the
+rem    "License"); you may not use this file except in compliance
+rem    with the License.  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem    Unless required by applicable law or agreed to in writing,
+rem    software distributed under the License is distributed on an
+rem    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem    KIND, either express or implied.  See the License for the
+rem    specific language governing permissions and limitations
+rem    under the License.
+rem
+
 rem This batch file creates a release.
 rem It requires Cygwin.
 
-set DOTCMISZIP=dotcmis-0.1.zip
+set DOTCMISVERSION=0.1
+set DOTCMISZIP=chemistry-dotcmis-%DOTCMISVERSION%.zip
+set DOTCMISRC=RC1
 
 echo Building...
 cd DotCMIS
@@ -25,11 +46,11 @@ copy DotCMIS\bin\Release\DotCMIS.dll rel
 copy DotCMIS\doc\DotCMISDoc.chm release
 
 echo Copying source...
-mkdir release\source
-xcopy DotCMIS release\source /E
-rmdir /S /Q release\source\bin
-rmdir /S /Q release\source\obj
-rmdir /S /Q release\source\doc
+mkdir release\src
+xcopy DotCMIS release\src /E
+rmdir /S /Q release\src\bin
+rmdir /S /Q release\src\obj
+rmdir /S /Q release\src\doc
 
 echo Creating release file...
 del %DOTCMISZIP%
@@ -41,4 +62,9 @@ echo Signing release file...
 gpg --armor --output %DOTCMISZIP%.asc --detach-sig %DOTCMISZIP%
 gpg --print-md MD5 %DOTCMISZIP% > %DOTCMISZIP%.md5
 gpg --print-md SHA512 %DOTCMISZIP% > %DOTCMISZIP%.sha
+gpg --print-md MD5 %DOTCMISZIP%.asc > %DOTCMISZIP%.asc.md5
+gpg --print-md SHA512 %DOTCMISZIP%.asc > %DOTCMISZIP%.asc.sha
+
+echo Creating RC tag
+rem svn copy https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk https://svn.apache.org/repos/asf/chemistry/dotcmis/tags/chemistry-dotcmis-%DOTCMISVERSION%-%DOTCMISRC%
 



Mime
View raw message