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:24:45 UTC

[groovy] branch master updated: small error in test (closes #867)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new f1ddff9  small error in test (closes #867)
f1ddff9 is described below

commit f1ddff91ab73c4a41caefad0b15287224c72be9f
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[]
     }