Search in sources :

Example 1 with Comparables

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

the class ComparablesBaseTest method setUp.

@Before
public void setUp() {
    failures = spy(new Failures());
    comparables = new Comparables();
    comparables.failures = failures;
    customComparisonStrategy = new ComparatorBasedComparisonStrategy(comparatorForCustomComparisonStrategy());
    comparablesWithCustomComparisonStrategy = new Comparables(customComparisonStrategy);
    comparablesWithCustomComparisonStrategy.failures = failures;
}
Also used : ComparatorBasedComparisonStrategy(org.assertj.core.internal.ComparatorBasedComparisonStrategy) Comparables(org.assertj.core.internal.Comparables) Failures(org.assertj.core.internal.Failures) Before(org.junit.Before)

Example 2 with Comparables

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

the class AbstractComparableAssert method usingDefaultComparator.

@Override
@CheckReturnValue
public SELF usingDefaultComparator() {
    super.usingDefaultComparator();
    this.comparables = new Comparables();
    return myself;
}
Also used : Comparables(org.assertj.core.internal.Comparables) CheckReturnValue(org.assertj.core.util.CheckReturnValue)

Example 3 with Comparables

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

the class AbstractComparableAssert_usingDefaultComparator_Test method verify_internal_effects.

@Override
protected void verify_internal_effects() {
    assertThat(getObjects(assertions)).isSameAs(Objects.instance());
    assertThat(getComparables(assertions)).isEqualTo(new Comparables());
}
Also used : Comparables(org.assertj.core.internal.Comparables)

Example 4 with Comparables

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

the class AbstractComparableAssert method usingComparator.

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

Aggregations

Comparables (org.assertj.core.internal.Comparables)4 ComparatorBasedComparisonStrategy (org.assertj.core.internal.ComparatorBasedComparisonStrategy)2 CheckReturnValue (org.assertj.core.util.CheckReturnValue)2 Failures (org.assertj.core.internal.Failures)1 Before (org.junit.Before)1