|
Groovy example source code file (MarkupAndMethodBug.groovy)
The Groovy MarkupAndMethodBug.groovy source codepackage groovy.bugs /** * Mixes variables, closures and method calls in markup * * @version $Revision: 8941 $ */ class MarkupAndMethodBug extends GroovyTestCase { void testBug() { def tree = createTree() def name = tree.person[0]['@name'] assert name == 'James' } protected def createTree() { def builder = NodeBuilder.newInstance() def root = builder.people() { person(name:getTestName()) } assert root != null return root } protected def getTestName() { "James" } } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy MarkupAndMethodBug.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.