Search in sources :

Example 1 with Longs

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

the class AbstractLongAssert method usingComparator.

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

Example 2 with Longs

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

the class AtomicLongAssert method usingComparator.

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

Example 3 with Longs

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

the class LongsBaseTest method setUp.

@Before
public void setUp() {
    failures = spy(new Failures());
    longs = new Longs();
    longs.setFailures(failures);
    absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Long>());
    longsWithAbsValueComparisonStrategy = new Longs(absValueComparisonStrategy);
    longsWithAbsValueComparisonStrategy.failures = failures;
}
Also used : Longs(org.assertj.core.internal.Longs) 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)3 Longs (org.assertj.core.internal.Longs)3 CheckReturnValue (org.assertj.core.util.CheckReturnValue)2 Failures (org.assertj.core.internal.Failures)1 AbsValueComparator (org.assertj.core.util.AbsValueComparator)1 Before (org.junit.Before)1