alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Groovy example source code file (Groovy831_Bug.groovy)

This example Groovy source code file (Groovy831_Bug.groovy) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

america, america, kingdom, kingdom, korea, london, republic, seoul, seoul, state, string, united, united, wasington

The Groovy Groovy831_Bug.groovy source code

package groovy.bugs

/**
 * Test for fixing the Jira issue GROOVY-831
 *
 * @author Pilho Kim
 * @version $Revision: 3827 $
 */
class Groovy831_Bug extends GroovyTestCase {
    
    String[] cities = ['Seoul', 'London', 'Wasington']
    int[] intArrayData = [1, 3, 5]

    public String[] countries = [ 'Republic of Korea', 'United Kingdom', 'United State of America']
    public  int[] intArray  = [ 2, 4, 6 ]

    void testSetFieldProperty() {
        assert cities.size() == 3
        assert cities[0] == 'Seoul'
        assert cities[1] == 'London'
        assert cities[2] == 'Wasington'
        assert intArrayData.size() == 3
        assert intArrayData[0] == 1
        assert intArrayData[1] == 3
        assert intArrayData[2] == 5
    }

    void testSetFieldVariable() {
        assert countries.size() == 3
        assert countries[0] == 'Republic of Korea'
        assert countries[1] == 'United Kingdom'
        assert countries[2] == 'United State of America'
        assert intArray[0] == 2
        assert intArray[1] == 4
        assert intArray[2] == 6
    }
}

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy Groovy831_Bug.groovy source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

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.