Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 15941 invoked from network); 29 Apr 2005 10:33:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2005 10:33:05 -0000 Received: (qmail 1666 invoked by uid 500); 29 Apr 2005 10:34:20 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 1645 invoked by uid 500); 29 Apr 2005 10:34:20 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 1639 invoked by uid 99); 29 Apr 2005 10:34:20 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 29 Apr 2005 03:34:19 -0700 Received: (qmail 15919 invoked by uid 65534); 29 Apr 2005 10:33:03 -0000 Message-ID: <20050429103303.15917.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r165290 - in /incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api: ExportDocViewTest.java SysViewContentHandler.java TreeComparator.java Date: Fri, 29 Apr 2005 10:33:02 -0000 To: jackrabbit-cvs@incubator.apache.org From: stefan@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: stefan Date: Fri Apr 29 03:33:00 2005 New Revision: 165290 URL: http://svn.apache.org/viewcvs?rev=3D165290&view=3Drev Log: adapting testcases to latest spec (0.16.4.1) Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/Expo= rtDocViewTest.java incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SysV= iewContentHandler.java incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/Tree= Comparator.java Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/ap= i/ExportDocViewTest.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/= apache/jackrabbit/test/api/ExportDocViewTest.java?rev=3D165290&r1=3D165289&= r2=3D165290&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/Expo= rtDocViewTest.java (original) +++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/Expo= rtDocViewTest.java Fri Apr 29 03:33:00 2005 @@ -434,8 +434,9 @@ boolean isBinary =3D (prop.getType() =3D=3D PropertyType.BINARY); if (skipBinary) { if (isBinary) { - assertEquals("Binary property " + prop.getPath() + - " exported although skipBinary is true", attribute= , null); + assertEquals("Value of binary property " + prop.getPath() + + " exported although skipBinary is true", + attribute.getValue().length(), 0); } // check the flags else { @@ -553,8 +554,16 @@ } } } - assertEquals("Value of property " + prop.getPath() + - " is not exported correctly: ", val, attrVal); + if (isBinary && skipBinary) { + assertEquals("Value of binary property " + prop.getPath() + + " is not exported correctly: ", "", attrVal); + assertEquals("Value of binary property " + prop.getPath() + + " exported although skipBinary is true", + "", attrVal); + } else { + assertEquals("Value of property " + prop.getPath() + + " is not exported correctly: ", val, attrVal); + } } =20 /** @@ -631,15 +640,12 @@ while (iter.hasNext()) { Property prop =3D iter.nextProperty(); String name =3D prop.getName(); - boolean isBinary =3D prop.getType() =3D=3D PropertyType.BINARY; boolean isMultiple =3D prop.getDefinition().isMultiple(); =20 // props not exported so we decrease the expected size. if (!exportInvalidXmlNames && !XMLChar.isValidName(name)) { size--; } else if (!exportMultivalProps && isMultiple) { - size--; - } else if (skipBinary && isBinary) { size--; } } Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/ap= i/SysViewContentHandler.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/= apache/jackrabbit/test/api/SysViewContentHandler.java?rev=3D165290&r1=3D165= 289&r2=3D165290&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SysV= iewContentHandler.java (original) +++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SysV= iewContentHandler.java Fri Apr 29 03:33:00 2005 @@ -421,7 +421,6 @@ boolean correctVal =3D false; Node node =3D nodeElem.node; ArrayList propElems =3D nodeElem.propElems; - long binaryCounter =3D 0; =20 // no props exported if (propElems.size() =3D=3D 0) { @@ -528,8 +527,9 @@ } // skipBinary true and propType is Binary, should be s= kipped else { - checkCondition("Binary property "+ prop.getPath() - + " exported although skipBinary flag is t= rue.", false); + checkCondition("Value of binary property "+ prop.g= etPath() + + " exported although skipBinary flag is t= rue.", + propElem.values.isEmpty()); } } // given node has no property with the name given by the p= rop element @@ -540,17 +540,8 @@ } } // compare the sizes here - if (skipBinary) { - PropertyIterator propIter =3D node.getProperties(); - while (propIter.hasNext()) { - if (propIter.nextProperty().getType() =3D=3D PropertyT= ype.BINARY) { - binaryCounter++; - } - } - } - long otherSize =3D getSize(node.getProperties()); - allFound =3D (propElems.size() + binaryCounter =3D=3D otherSiz= e); + allFound =3D propElems.size() =3D=3D otherSize; checkCondition("Not all properties of node " + nodeElem.path + " are exported.", allFound); } Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/ap= i/TreeComparator.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/= apache/jackrabbit/test/api/TreeComparator.java?rev=3D165290&r1=3D165289&r2= =3D165290&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/Tree= Comparator.java (original) +++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/Tree= Comparator.java Fri Apr 29 03:33:00 2005 @@ -428,23 +428,14 @@ if (!propertySkipped(pName)) { try { pb =3D b.getProperty(pName); - //fail if the property is there but should not be - if (skipBinary && pType =3D=3D PropertyType.BINARY) { - // todo - fail("Property '" + pPath + "' must not be availab= le if skipBinary=3Dtrue."); - } - } catch (RepositoryException e) { //fail if the property is not there but should - if (!(skipBinary && pType =3D=3D PropertyType.BINARY))= { - // todo - fail("Property '" + pPath + "' not available: " + = e); - fail("Property '" + pPath + "' not available: " + = e); - } + fail("Property '" + pPath + "' not available: " + e); } =20 - //if the property should be available and is available, th= en compare source and target value if (!(skipBinary && pType =3D=3D PropertyType.BINARY)) { + // todo + // compare source and target value compareProperties(pa, pb); } }