[ https://issues.apache.org/jira/browse/OFBIZ-10611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-10611. ----------------------------------- Resolution: Implemented Thanks Mathieu, Your patch is in trunk at revision: 1846393 I had to manually move the FileUtilTests.groovy file, so this did not work (using ToirtoiseSvn or Eclipse patching on Windows) {code} diff --git framework/base/groovyScript/test/FileUtilTests.groovy framework/base/src/test/groovy/org/apache/ofbiz/base/util/FileUtilTests.groovy similarity index 84% rename from framework/base/groovyScript/test/FileUtilTests.groovy rename to framework/base/src/test/groovy/org/apache/ofbiz/base/util/FileUtilTests.groovy index 9a7d0af4c3..ff39594f05 100644 --- framework/base/groovyScript/test/FileUtilTests.groovy +++ framework/base/src/test/groovy/org/apache/ofbiz/base/util/FileUtilTests.groovy {code} > Allow unit tests to be written in Groovy > ---------------------------------------- > > Key: OFBIZ-10611 > URL: https://issues.apache.org/jira/browse/OFBIZ-10611 > Project: OFBiz > Issue Type: Improvement > Affects Versions: Trunk > Reporter: Mathieu Lirzin > Assignee: Jacques Le Roux > Priority: Minor > Fix For: Upcoming Branch > > Attachments: > OFBIZ-10611_Allow-unit-tests-to-be-written-in-Groovy.patch > > > Since OFBIZ-9996 it is possible to write integration tests in Groovy, meaning > test that depend on the dispatcher and the delegator. It would be nice if the > unit tests could be written in Groovy too. > The major benefit of writing tests in Groovy is that you create inputs and > expected outputs more easily with objects literals. For example the following > java code: > {code:java} > Map<String, Integer> input = new HashMap<>(); > input.put("foo", 42); > input.put("bar", 37); > {code} > can be rewritten in Groovy like this: > {code:java} > def input = [foo: 42, bar: 37] > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)