From commits-return-3937-apmail-commons-commits-archive=commons.apache.org@commons.apache.org Thu Sep 11 17:05:53 2008 Return-Path: Delivered-To: apmail-commons-commits-archive@locus.apache.org Received: (qmail 21385 invoked from network); 11 Sep 2008 17:05:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 17:05:53 -0000 Received: (qmail 66180 invoked by uid 500); 11 Sep 2008 17:05:49 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 66080 invoked by uid 500); 11 Sep 2008 17:05:48 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 66031 invoked by uid 99); 11 Sep 2008 17:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 10:05:48 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 17:04:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 89B982388A04; Thu, 11 Sep 2008 10:05:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r694353 - in /commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model: dom/DOMModelTest.java jdom/JDOMModelTest.java Date: Thu, 11 Sep 2008 17:04:59 -0000 To: commits@commons.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080911170500.89B982388A04@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Thu Sep 11 10:04:57 2008 New Revision: 694353 URL: http://svn.apache.org/viewvc?rev=694353&view=rev Log: further tests for [JXPATH-12] Modified: commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/dom/DOMModelTest.java commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/jdom/JDOMModelTest.java Modified: commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/dom/DOMModelTest.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/dom/DOMModelTest.java?rev=694353&r1=694352&r2=694353&view=diff ============================================================================== --- commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/dom/DOMModelTest.java (original) +++ commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/dom/DOMModelTest.java Thu Sep 11 10:04:57 2008 @@ -17,6 +17,7 @@ package org.apache.commons.jxpath.ri.model.dom; import org.apache.commons.jxpath.AbstractFactory; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.ri.model.XMLModelTestCase; import org.apache.commons.jxpath.xml.DocumentContainer; @@ -49,7 +50,13 @@ assertXPathNodeType(context, "//location/@name", Attr.class); assertXPathNodeType(context, "//vendor", Element.class); } - + + public void testGetElementDescendantOrSelf() { + JXPathContext childContext = context.getRelativeContext(context.getPointer("/vendor")); + assertTrue(childContext.getContextBean() instanceof Element); + assertXPathNodeType(childContext, "//vendor", Element.class); + } + protected String getXMLSignature( Object node, boolean elements, Modified: commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/jdom/JDOMModelTest.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/jdom/JDOMModelTest.java?rev=694353&r1=694352&r2=694353&view=diff ============================================================================== --- commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/jdom/JDOMModelTest.java (original) +++ commons/proper/jxpath/trunk/src/test/org/apache/commons/jxpath/ri/model/jdom/JDOMModelTest.java Thu Sep 11 10:04:57 2008 @@ -19,6 +19,7 @@ import java.util.List; import org.apache.commons.jxpath.AbstractFactory; +import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.jxpath.ri.model.XMLModelTestCase; import org.apache.commons.jxpath.xml.DocumentContainer; @@ -46,7 +47,13 @@ assertXPathNodeType(context, "//location/@name", Attribute.class); assertXPathNodeType(context, "//vendor", Element.class); //bugzilla #38586 } - + + public void testGetElementDescendantOrSelf() { + JXPathContext childContext = context.getRelativeContext(context.getPointer("/vendor")); + assertTrue(childContext.getContextBean() instanceof Element); + assertXPathNodeType(childContext, "//vendor", Element.class); + } + public void testID() { // id() is not supported by JDOM }