|
Groovy example source code file (Groovy2365Base.groovy)
The Groovy Groovy2365Base.groovy source code/** * Created by IntelliJ IDEA. * User: applerestore * Date: Dec 11, 2007 * Time: 3:29:40 PM * To change this template use File | Settings | File Templates. */ package groovy.bugs class Groovy2365Base extends GroovyTestCase { protected String createData () { File dir = createTempDir("groovy-src-", "-src") assertNotNull dir def fileList = [ "Util.groovy" : """ class Util { static String NAME = "Util accessed" } """, "Script1.groovy" : """ import Util println "Script1 \${Util.NAME}" """, "Script2.groovy" : """ import Util println "Script2 \${Util.NAME}" """ ].collect { name, text -> File file = new File(dir, name) file.write text file } return dir.absolutePath } private File createTempDir (prefix, suffix) { File tempFile = File.createTempFile(prefix, suffix); tempFile.delete(); tempFile.mkdirs(); tempFile.deleteOnExit() return tempFile; } } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy Groovy2365Base.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.