Is there an equivalent to JUnits assertEquals(double expected, double actual, double delta) to define a tolerance level when comparing numeric values?
The DefaultDataTypeFactory provides the method “addToleratedDelta()” to define an allowed deviation of the compared values for a specific database column. DefaultDataTypeFactory datatypeFactory = new OracleDataTypeFactory(); datatypeFactory.addToleratedDelta(new ToleratedDelta(“TEST_TABLE”, “COLUMN0”, 0.0001)); // Set the datatype factory DatabaseConnection dbConnection = new DatabaseConnection(jdbcConnection); dbConnection.getConfig().setProperty(DatabaseConfig.
Related Questions
- Can I add more information to the result of an assertEquals(double expected, double actual) call so that I can easily identify the rows that mismatch?
- Is there an equivalent to JUnits assertEquals(double expected, double actual, double delta) to define a tolerance level when comparing numeric values?
- Are Classics, History or Philosophy university level courses equivalent to the English pre-professional requirement?