Skip to content

Commit

Permalink
#62 extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Jun 5, 2015
1 parent c029239 commit 1bc7fc1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/com/jcabi/xml/XMLDocumentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Ignore;
import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Expand Down Expand Up @@ -389,4 +390,23 @@ public void preservesImmutability() throws Exception {
);
}

/**
* XMLDocument can apply XPath to cloned node.
*
* This test doesn't work. If I replace "//z9/@a" with "z9/@a" it works
* perfectly. I'm not sure what is that, but would be great to fix it.
*
* @throws Exception If something goes wrong inside
*/
@Test
@Ignore
public void appliesXpathToClonedNode() throws Exception {
final XML xml = new XMLDocument("<t6><z9 a='433'/></t6>");
final XML root = xml.nodes("/t6").get(0);
MatcherAssert.assertThat(
root.xpath("//z9/@a").get(0),
Matchers.equalTo("433")
);
}

}

0 comments on commit 1bc7fc1

Please sign in to comment.