use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class AbstractBigDecimalAssert method usingComparator.
@Override
@CheckReturnValue
public SELF usingComparator(Comparator<? super BigDecimal> customComparator, String customComparatorDescription) {
super.usingComparator(customComparator, customComparatorDescription);
this.bigDecimals = new BigDecimals(new ComparatorBasedComparisonStrategy(customComparator, customComparatorDescription));
return myself;
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class ObjectArrayAssert_usingElementComparatorIgnoringFields_Test method verify_internal_effects.
@Override
protected void verify_internal_effects() {
ObjectArrays iterables = getArrays(assertions);
assertThat(iterables).isNotSameAs(arraysBefore);
assertThat(iterables.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
ComparatorBasedComparisonStrategy strategy = (ComparatorBasedComparisonStrategy) iterables.getComparisonStrategy();
assertThat(strategy.getComparator()).isInstanceOf(ExtendedByTypesComparator.class);
assertThat(((IgnoringFieldsComparator) ((ExtendedByTypesComparator) strategy.getComparator()).getComparator()).getFields()).containsOnly("field");
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class ObjectArrayAssert_usingElementComparatorOnFields_Test method verify_internal_effects.
@Override
protected void verify_internal_effects() {
ObjectArrays arrays = getArrays(assertions);
assertThat(arrays).isNotSameAs(arraysBefore);
assertThat(arrays.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
ComparatorBasedComparisonStrategy strategy = (ComparatorBasedComparisonStrategy) arrays.getComparisonStrategy();
assertThat(strategy.getComparator()).isInstanceOf(ExtendedByTypesComparator.class);
assertThat(((OnFieldsComparator) ((ExtendedByTypesComparator) strategy.getComparator()).getComparator()).getFields()).containsOnly("field");
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class AtomicReferenceArrayAssert_usingElementComparatorIgnoringFields_Test method verify_internal_effects.
@Override
protected void verify_internal_effects() {
ObjectArrays iterables = getArrays(assertions);
assertThat(iterables).isNotSameAs(arraysBefore);
assertThat(iterables.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
ComparatorBasedComparisonStrategy strategy = (ComparatorBasedComparisonStrategy) iterables.getComparisonStrategy();
assertThat(strategy.getComparator()).isInstanceOf(ExtendedByTypesComparator.class);
assertThat(((IgnoringFieldsComparator) ((ExtendedByTypesComparator) strategy.getComparator()).getComparator()).getFields()).containsOnly("field");
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class AtomicReferenceArrayAssert_usingElementComparatorOnFields_Test method verify_internal_effects.
@Override
protected void verify_internal_effects() {
ObjectArrays arrays = getArrays(assertions);
assertThat(arrays).isNotSameAs(arraysBefore);
assertThat(arrays.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
ComparatorBasedComparisonStrategy strategy = (ComparatorBasedComparisonStrategy) arrays.getComparisonStrategy();
assertThat(strategy.getComparator()).isInstanceOf(ExtendedByTypesComparator.class);
assertThat(((OnFieldsComparator) ((ExtendedByTypesComparator) strategy.getComparator()).getComparator()).getFields()).containsOnly("field");
}
Aggregations