Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there an equivalent to JUnits assertEquals(double expected, double actual, double delta) to define a tolerance level when comparing numeric values?

0
Posted

Is there an equivalent to JUnits assertEquals(double expected, double actual, double delta) to define a tolerance level when comparing numeric values?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123