import groovy.OuterUser

/**
 * Checks that it's possible to call inner classes constructor from groovy
 * @author Guillaume Laforge
 */
class CallInnerClassCtorTest extends GroovyTestCase {

    void testCallCtor() {
        user = new OuterUser()
        user.name = "Guillaume"
        user.age = 27

        assert user.name == "Guillaume"
        assert user.age == 27
    }

    void testCallInnerCtor() {
        address = new OuterUser.InnerAddress()
        address.city = "Meudon"
        address.zipcode = 92360

        assert address.city == "Meudon"
        assert address.zipcode == 92360
    }

}
import groovy.OuterUser

/**
 * Checks that it's possible to call inner classes constructor from groovy
 * @author Guillaume Laforge
 */
class CallInnerClassCtorTest extends GroovyTestCase {

    void testCallCtor() {
        user = new groovy.OuterUser()
        user.name = "Guillaume"
        user.age = 27

        assert user.name == "Guillaume"
        assert user.age == 27
    }

    void testCallInnerCtor() {
        address = new groovy.OuterUser.InnerAddress()
        address.city = "Meudon"
        address.zipcode = 92360

        assert address.city == "Meudon"
        assert address.zipcode == 92360
    }

}
Test case to check that it's possible to call inner classes ctors from groovy
Test case to check that it's possible to call inner classes ctors from groovy


git-svn-id: aa43ce4553b005588bb3cc6c16966320b011facb@1387 a5544e8c-8a19-0410-ba12-f9af4593a198
