You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CustOrder produce toString with localized total value string representation: @Override public String toString() { return customerId + ":" + orderId + ":" + new DecimalFormat("##.00").format(total); }
but in the assertion is used constant value string representation with dot as decimal separator (88.80) In the countries when decimal separator is different from dot this assertion is false.
CustOrder produce toString with localized total value string representation:
@Override public String toString() { return customerId + ":" + orderId + ":" + new DecimalFormat("##.00").format(total); }
but in the assertion is used constant value string representation with dot as decimal separator (88.80) In the countries when decimal separator is different from dot this assertion is false.
assertEquals("[ANATR:10308:88.80]", orders.toString());
suggested simple solution:
assertEquals("[ANATR:10308:"+ new DecimalFormat("##.00").format(88.80) + "]", orders.toString());
The text was updated successfully, but these errors were encountered: