All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.internal.junit.InexactComparisonCriteria Maven / Gradle / Ivy

There is a newer version: 7.10.2
Show newest version
package org.testng.internal.junit;

import org.testng.AssertJUnit;

public class InexactComparisonCriteria extends ComparisonCriteria {
  public final double fDelta;

  public InexactComparisonCriteria(double delta) {
    fDelta = delta;
  }

  @Override
  protected void assertElementsEqual(Object expected, Object actual) {
    if (expected instanceof Double)
      AssertJUnit.assertEquals((Double) expected, (Double) actual, fDelta);
    else AssertJUnit.assertEquals((Float) expected, (Float) actual, fDelta);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy