use of org.assertj.core.util.AbsValueComparator in project assertj-core by joel-costigliola.
the class AtomicIntegerArrayAssert_usingElementComparator_Test method should_honor_the_given_element_comparator.
@Test
public void should_honor_the_given_element_comparator() {
AtomicIntegerArray actual = new AtomicIntegerArray(new int[] { 1, 2, 3, 4 });
assertThat(actual).usingElementComparator(new AbsValueComparator<Integer>()).containsExactly(-1, 2, 3, -4);
}
use of org.assertj.core.util.AbsValueComparator 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;
}
use of org.assertj.core.util.AbsValueComparator in project assertj-core by joel-costigliola.
the class IntegersBaseTest method setUp.
@Before
public void setUp() {
failures = spy(new Failures());
integers = new Integers();
integers.setFailures(failures);
absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Integer>());
integersWithAbsValueComparisonStrategy = new Integers(absValueComparisonStrategy);
integersWithAbsValueComparisonStrategy.failures = failures;
}
use of org.assertj.core.util.AbsValueComparator 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;
}
Aggregations