Commit Graph
6 Commits
Author SHA1 Message Date
Jacques Le Roux 7cc7fd2cea Improved: Allow unit tests to be written in Groovy
(OFBIZ-10611)

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:

Map<String, Integer> input = new HashMap<>();
  input.put("foo", 42);
  input.put("bar", 37);

can be rewritten in Groovy like this:
  def input = [foo: 42, bar: 37]

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846393 13f79535-47bb-0310-9956-ffa450edef68
2018-11-12 10:57:27 +00:00
Gil Portenseigne 78bf31c937 Fixed: Convert README.md to README.adoc.
(OFBIZ-10272)

Complete Jacques Fix, replacing all README.md occurence with README.adoc.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827470 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 08:54:00 +00:00
Jacques Le Roux 6813d5d2b1 Fixed: Convert README.md to README.adoc.
(OFBIZ-10272)

Not sure why it went unnoticed so long, but by removing README.md 
(replacing README.adoc) r1827046 brokes testZipReadme

Not a big deal, we can just replace the file in the test (from README.md to 
README.adoc). We could chose a more sure to remain file, but I guess that now we 
are going with asciidoc and README.adoc should stay

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827457 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 05:30:39 +00:00
Gil Portenseigne fba4f5b235 Implemented : Add new FileUtil methods for zip management (OFBIZ-10188)
Add zipFileStream method that will zip FileStream to a zipped one.
Add unzipFileToFolder method to unzip a given archive to a given Folder.
Add fileUtil groovy test suite that create zip file containing README.md, then unzip it to tmp folder and compare original and unzipped files.
Thanks Jacques for the review.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823567 13f79535-47bb-0310-9956-ffa450edef68
2018-02-08 15:32:31 +00:00
Nicolas Malin 21fa500df1 Improved: complete previous commit to add security in groovy context (OFBIZ-10196)
add security on groovy junit test
add security on eclipse and intellij groovy dsl definition
Thanks to Dennis Balkir for the suggest

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823028 13f79535-47bb-0310-9956-ffa450edef68
2018-02-03 14:16:16 +00:00
Nicolas Malin faadb7dca4 Fixed: forget to add the class GroovyScriptTestCase.java ans the simple groovy test-suite in the previous commit related to issue OFBIZ-9996
Correct introduced typo in framework/testtools/dtd/test-suite.xsd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816345 13f79535-47bb-0310-9956-ffa450edef68
2017-11-25 20:05:29 +00:00