Provides the following benefits:
1. Test data independence per component suite
2. Ability to run tests repeatedly without reloading the database
3. Continued database independence for the testing tools
4. The possibility of future improvements for controlling when data is rolled back (per unit test, group of unit tests within a suite or
even tree structured tests where data is partially rolled back before continuing)
5. The future possibility to export data changes resulting from a test run
6. The future possibility to verify a test result automatically based on the output of #4
The rollback currently doesn't catch changes resulting from async service calls and also doesn't rollback changes to SequenceValueItem
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@765057 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
The idea is also that a lot of code is duplicated and then changed (copy/paste). Hence having a rightly formatted code help to keep it rightly formatted
1st (simple) step : ){ => ) { (I checked all occurrences but of course other pairs of eyeballs are welcome)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@750993 13f79535-47bb-0310-9956-ffa450edef68
This close this issue.
There are some labels related to geoLocation in this commit, I will commit the geoLocation work as is since I will not have much time this next weeks to work on it. Anyway it's already sufficient as a basis for other parts.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@735402 13f79535-47bb-0310-9956-ffa450edef68
1. Fixed a bug in the TimeOfDayRange class where it didn't calculate properly across a daylight saving transition.
2. Added interval and count to TimeOfDayRange. Now the next() method will increment according to the new fields.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@718373 13f79535-47bb-0310-9956-ffa450edef68
1. Hardened classes.
2. Added accessor methods to expression classes and added a visitor interface. These are in preparation for the upcoming iCalendar integration.
3. JavaDoc improvements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@713848 13f79535-47bb-0310-9956-ffa450edef68
I tried my best to break this up into re-usable pieces and put them where I thought they made sense. Feel free to move things around if you have a better idea.
Internationalization note: this commit contains new UI labels.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@700310 13f79535-47bb-0310-9956-ffa450edef68
I think this is ready now. The expression language won't change and the Java API won't change, so we can start building on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@696344 13f79535-47bb-0310-9956-ffa450edef68
Yes, there is millisecond arithmetic in this code. No, I haven't changed my view on it - millisecond arithmetic is still Evil. In this case I'm just using it to get a java.util.Calendar instance in the neighborhood of where I need it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@696134 13f79535-47bb-0310-9956-ffa450edef68
I moved the recurrence count to the job sandbox. Keeping counters in the recurrence info was a bad idea. Any other code that relied upon counters in recurrence info will have to be redesigned to use temporal expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@695695 13f79535-47bb-0310-9956-ffa450edef68
1. Improved parsing logic - the entire expression is pre-parsed now.
2. Factory method stores parsed expressions in the cache.
3. Single null/empty expression instance - saves on memory.
4. Class names and variable names shortened to reduce object size.
5. Small performance improvements.
The expression cache is set up with no limit. We'll have to see if that needs to be changed. Larger installations might need to limit the expression cache size.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687422 13f79535-47bb-0310-9956-ffa450edef68
if (* != null && *.size() > 0) {
where * is a variable name (String or Collection). Rewritten to
if (UtilValidate.isNotEmpty(*)) {
Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {
And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68