use of org.assertj.core.util.AbsValueComparator 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;
}
use of org.assertj.core.util.AbsValueComparator in project assertj-core by joel-costigliola.
the class ShortsBaseTest method setUp.
@Before
public void setUp() {
failures = spy(new Failures());
shorts = new Shorts();
shorts.setFailures(failures);
absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Short>());
shortsWithAbsValueComparisonStrategy = new Shorts(absValueComparisonStrategy);
shortsWithAbsValueComparisonStrategy.failures = failures;
}
use of org.assertj.core.util.AbsValueComparator in project assertj-core by joel-costigliola.
the class AtomicIntegerArrayAssert_hasArray_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 });
assertThat(actual).usingElementComparator(new AbsValueComparator<Integer>()).hasArray(new int[] { -1, 2, 3 });
}
use of org.assertj.core.util.AbsValueComparator in project assertj-core by joel-costigliola.
the class AtomicLongArrayAssert_hasArray_Test method should_honor_the_given_element_comparator.
@Test
public void should_honor_the_given_element_comparator() {
AtomicLongArray actual = new AtomicLongArray(new long[] { 1, 2, 3 });
assertThat(actual).usingElementComparator(new AbsValueComparator<Long>()).hasArray(new long[] { -1, 2, 3 });
}
use of org.assertj.core.util.AbsValueComparator in project assertj-core by joel-costigliola.
the class AtomicLongArrayAssert_usingElementComparator_Test method should_honor_the_given_element_comparator.
@Test
public void should_honor_the_given_element_comparator() {
AtomicLongArray actual = new AtomicLongArray(new long[] { 1, 2, 3, 4 });
assertThat(actual).usingElementComparator(new AbsValueComparator<Long>()).containsExactly(-1, 2, 3, -4);
}
Aggregations