Search in sources :

Example 1 with Floats

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

the class FloatsBaseTest method setUp.

@Before
public void setUp() {
    failures = spy(new Failures());
    floats = new Floats();
    floats.setFailures(failures);
    absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Float>());
    floatsWithAbsValueComparisonStrategy = new Floats(absValueComparisonStrategy);
    floatsWithAbsValueComparisonStrategy.failures = failures;
}
Also used : AbsValueComparator(org.assertj.core.util.AbsValueComparator) ComparatorBasedComparisonStrategy(org.assertj.core.internal.ComparatorBasedComparisonStrategy) Failures(org.assertj.core.internal.Failures) Floats(org.assertj.core.internal.Floats) Before(org.junit.Before)

Example 2 with Floats

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

the class AbstractFloatAssert method usingComparator.

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

Aggregations

ComparatorBasedComparisonStrategy (org.assertj.core.internal.ComparatorBasedComparisonStrategy)2 Floats (org.assertj.core.internal.Floats)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