You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/01/31 09:40:29 UTC
[groovy] 01/02: small error in test (closes #867)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 56b91bc3c3a5497855d0f06f82361e3b48a64e9f
Author: Jorge <ja...@gmail.com>
AuthorDate: Wed Jan 30 10:16:09 2019 +0100
small error in test (closes #867)
The author of Don Xijote was Miguel de Cervantes
---
.../groovy-xml/src/spec/test/UserGuideXmlUtilTest.groovy | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/subprojects/groovy-xml/src/spec/test/UserGuideXmlUtilTest.groovy b/subprojects/groovy-xml/src/spec/test/UserGuideXmlUtilTest.groovy
index bb6ab46..b43e0c4 100644
--- a/subprojects/groovy-xml/src/spec/test/UserGuideXmlUtilTest.groovy
+++ b/subprojects/groovy-xml/src/spec/test/UserGuideXmlUtilTest.groovy
@@ -18,12 +18,10 @@
*/
package groovy.xml
-import groovy.util.GroovyTestCase
-
/**
-* Tests for the Groovy Xml user guide related to XmlUtil.
-*/
-class UserGuideXmlUtilTest extends GroovyTestCase {
+ * Tests for the Groovy Xml user guide related to XmlUtil.
+ */
+class UserGuideXmlUtilTest extends GroovyTestCase {
// tag::responseBookXml[]
def xml = """
@@ -32,7 +30,7 @@ class UserGuideXmlUtilTest extends GroovyTestCase {
<books>
<book id="2">
<title>Don Xijote</title>
- <author id="1">Manuel De Cervantes</author>
+ <author id="1">Miguel De Cervantes</author>
</book>
</books>
</value>
@@ -43,11 +41,11 @@ class UserGuideXmlUtilTest extends GroovyTestCase {
void testGettingANode() {
// tag::testGettingANode[]
def response = new XmlParser().parseText(xml)
- def nodeToSerialize = response.'**'.find {it.name() == 'author'}
+ def nodeToSerialize = response.'**'.find { it.name() == 'author' }
def nodeAsText = XmlUtil.serialize(nodeToSerialize)
assert nodeAsText ==
- XmlUtil.serialize('<?xml version="1.0" encoding="UTF-8"?><author id="1">Manuel De Cervantes</author>')
+ XmlUtil.serialize('<?xml version="1.0" encoding="UTF-8"?><author id="1">Miguel De Cervantes</author>')
// end::testGettingANode[]
}