Search in sources :

Example 26 with ComparatorBasedComparisonStrategy

use of org.assertj.core.internal.ComparatorBasedComparisonStrategy 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 27 with ComparatorBasedComparisonStrategy

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

the class AbstractShortAssert method usingComparator.

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

Example 28 with ComparatorBasedComparisonStrategy

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

the class AbstractFloatAssert method usingComparator.

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

Example 29 with ComparatorBasedComparisonStrategy

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

the class AbstractCharSequenceAssert method usingComparator.

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

Example 30 with ComparatorBasedComparisonStrategy

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

the class AbstractCharacterAssert method usingComparator.

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

Aggregations

ComparatorBasedComparisonStrategy (org.assertj.core.internal.ComparatorBasedComparisonStrategy)64 Test (org.junit.Test)26 TextDescription (org.assertj.core.description.TextDescription)24 StandardRepresentation (org.assertj.core.presentation.StandardRepresentation)22 CheckReturnValue (org.assertj.core.util.CheckReturnValue)18 Failures (org.assertj.core.internal.Failures)10 Before (org.junit.Before)10 ObjectArrays (org.assertj.core.internal.ObjectArrays)8 Iterables (org.assertj.core.internal.Iterables)6 AbsValueComparator (org.assertj.core.util.AbsValueComparator)5 IgnoringFieldsComparator (org.assertj.core.internal.IgnoringFieldsComparator)4 Integers (org.assertj.core.internal.Integers)3 Lists (org.assertj.core.internal.Lists)3 Longs (org.assertj.core.internal.Longs)3 Objects (org.assertj.core.internal.Objects)3 OnFieldsComparator (org.assertj.core.internal.OnFieldsComparator)3 Characters (org.assertj.core.internal.Characters)2 Comparables (org.assertj.core.internal.Comparables)2 Doubles (org.assertj.core.internal.Doubles)2 Floats (org.assertj.core.internal.Floats)2