Uploaded image for project: 'HiveMind'
  1. HiveMind
  2. HIVEMIND-7

TestNumericTranslators not working with locale using comma as decimal point

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.0
    • framework
    • None

    Description

      testDoubleLow and testDoubleHigh compare the raised exception with hardcoded message text:

      "Value 208.3 is greater than maximum value 207.5"

      whereas the exception is generated like this on a german system:

      "Value 208.3 is greater than maximum value 207,5"

      which btw. is inconsistent, since the first number uses a point and the second a comma.

      I will attach a patch, that fixes this issue by generating the comparison text using MessageFormat.
      I would recommend to use class RulesMessages for generating all the comparison messages, but its not visible from the test unit.
      This would make the test more independent of changes in the message resources.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            ahuegen Achim Huegen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: