chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1452304 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
Date Mon, 04 Mar 2013 13:51:57 GMT
Author: fmui
Date: Mon Mar  4 13:51:56 2013
New Revision: 1452304

URL: http://svn.apache.org/r1452304
Log:
CMIS-633: TCK: policy text check

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.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/impl/AbstractSessionTest.java?rev=1452304&r1=1452303&r2=1452304&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
Mon Mar  4 13:51:56 2013
@@ -649,8 +649,7 @@ public abstract class AbstractSessionTes
                 // known properties that are strings and must be set
                 if (PropertyIds.OBJECT_ID.equals(propId) || PropertyIds.BASE_TYPE_ID.equals(propId)
                         || PropertyIds.OBJECT_TYPE_ID.equals(propId) || PropertyIds.PATH.equals(propId)
-                        || PropertyIds.SOURCE_ID.equals(propId) || PropertyIds.TARGET_ID.equals(propId)
-                        || PropertyIds.POLICY_TEXT.equals(propId)) {
+                        || PropertyIds.SOURCE_ID.equals(propId) || PropertyIds.TARGET_ID.equals(propId))
{
                     propertyCheck = PropertyCheckEnum.STRING_MUST_NOT_BE_EMPTY;
                 }
 
@@ -661,7 +660,7 @@ public abstract class AbstractSessionTes
                 }
 
                 // known properties that are strings and should be set
-                if (PropertyIds.NAME.equals(propId)) {
+                if (PropertyIds.NAME.equals(propId) || PropertyIds.POLICY_TEXT.equals(propId))
{
                     propertyCheck = PropertyCheckEnum.STRING_SHOULD_NOT_BE_EMPTY;
                 }
 
@@ -1511,10 +1510,12 @@ public abstract class AbstractSessionTes
             addResult(results, assertNotNull(property.getLocalName(), null, f));
 
             if ((propertyCheck == PropertyCheckEnum.MUST_BE_SET)
-                    || (propertyCheck == PropertyCheckEnum.STRING_MUST_NOT_BE_EMPTY)
-                    || (propertyCheck == PropertyCheckEnum.STRING_SHOULD_NOT_BE_EMPTY)) {
+                    || (propertyCheck == PropertyCheckEnum.STRING_MUST_NOT_BE_EMPTY)) {
                 f = createResult(FAILURE, "Property has no value!");
                 addResult(results, assertIsTrue(property.getValues().size() > 0, null,
f));
+            } else if (propertyCheck == PropertyCheckEnum.STRING_SHOULD_NOT_BE_EMPTY) {
+                f = createResult(WARNING, "Property has no value!");
+                addResult(results, assertIsTrue(property.getValues().size() > 0, null,
f));
             } else if (propertyCheck == PropertyCheckEnum.MUST_NOT_BE_SET) {
                 f = createResult(FAILURE, "Property has a value!");
                 addResult(results, assertIsTrue(property.getValues().size() == 0, null, f));



Mime
View raw message