The PercentageReplacer executes
return String.format("%6.2f", progress.getPercentage() * 100);
I'am using german locale on my machine, and in german we use a comma instead of a point as decimal separator (unfortunately this is a common issue). The test against " 0.00" (with dot) fails due to the actual string is " 0,00" (with comma).
You can fix this by passing a explicit locale that is using a dot as decimal separator:
return String.format(Locale.US, "%6.2f", progress.getPercentage() * 100);
For more details please have a look on SO: https://stackoverflow.com/questions/5236056/force-point-as-decimal-separator-in-java
The
PercentageReplacerexecutesI'am using german locale on my machine, and in german we use a comma instead of a point as decimal separator (unfortunately this is a common issue). The test against
" 0.00"(with dot) fails due to the actual string is" 0,00"(with comma).You can fix this by passing a explicit locale that is using a dot as decimal separator:
For more details please have a look on SO: https://stackoverflow.com/questions/5236056/force-point-as-decimal-separator-in-java