Search in sources :

Example 1 with Doubles

use of org.assertj.core.internal.Doubles in project assertj-core by joel-costigliola.

the class AbstractDoubleAssert method usingComparator.

@Override
@CheckReturnValue
public SELF usingComparator(Comparator<? super Double> customComparator, String customComparatorDescription) {
    super.usingComparator(customComparator, customComparatorDescription);
    doubles = new Doubles(new ComparatorBasedComparisonStrategy(customComparator, customComparatorDescription));
    return myself;
}
Also used : Doubles(org.assertj.core.internal.Doubles) ComparatorBasedComparisonStrategy(org.assertj.core.internal.ComparatorBasedComparisonStrategy) CheckReturnValue(org.assertj.core.util.CheckReturnValue)

Example 2 with Doubles

use of org.assertj.core.internal.Doubles in project assertj-core by joel-costigliola.

the class DoublesBaseTest method setUp.

@Before
public void setUp() {
    failures = spy(new Failures());
    doubles = new Doubles();
    doubles.setFailures(failures);
    absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Double>());
    doublesWithAbsValueComparisonStrategy = new Doubles(absValueComparisonStrategy);
    doublesWithAbsValueComparisonStrategy.failures = failures;
}
Also used : Doubles(org.assertj.core.internal.Doubles) AbsValueComparator(org.assertj.core.util.AbsValueComparator) ComparatorBasedComparisonStrategy(org.assertj.core.internal.ComparatorBasedComparisonStrategy) Failures(org.assertj.core.internal.Failures) Before(org.junit.Before)

Aggregations

ComparatorBasedComparisonStrategy (org.assertj.core.internal.ComparatorBasedComparisonStrategy)2 Doubles (org.assertj.core.internal.Doubles)2 Failures (org.assertj.core.internal.Failures)1 AbsValueComparator (org.assertj.core.util.AbsValueComparator)1 CheckReturnValue (org.assertj.core.util.CheckReturnValue)1 Before (org.junit.Before)1