HHH-6751 : Test failure due to inconsistent scale returned for BigDecimal properties
This commit is contained in:
parent
c5733e7837
commit
7c2d88df8b
|
@ -55,7 +55,12 @@ public class IntermediateMappedSuperclassTest extends BaseCoreFunctionalTestCase
|
|||
session = openSession();
|
||||
session.beginTransaction();
|
||||
Account account = (Account) session.get( Account.class, savingsAccount.getId() );
|
||||
assertEquals( withdrawalLimit, ( (SavingsAccount) account ).getWithdrawalLimit() );
|
||||
// Oracle returns the BigDecimal with scale=0, which is equal to 1000 (not 1000.00);
|
||||
// compare using BigDecimal.doubleValue;
|
||||
assertEquals(
|
||||
withdrawalLimit.doubleValue(),
|
||||
( (SavingsAccount) account ).getWithdrawalLimit().doubleValue(),
|
||||
0.001);
|
||||
session.delete( account );
|
||||
session.getTransaction().commit();
|
||||
session.close();
|
||||
|
|
Loading…
Reference in New Issue