use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class ComparatorBasedComparisonStrategy_isGreaterThan_Test method verify_that_isGreaterThan_delegates_to_compare_method.
@Test
public void verify_that_isGreaterThan_delegates_to_compare_method() {
caseInsensitiveStringComparator = mock(CaseInsensitiveStringComparator.class);
caseInsensitiveComparisonStrategy = new ComparatorBasedComparisonStrategy(caseInsensitiveStringComparator);
String s1 = "string1";
String s2 = "string2";
caseInsensitiveComparisonStrategy.isGreaterThan(s1, s2);
verify(caseInsensitiveStringComparator).compare(s1, s2);
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class CharactersBaseTest method setUp.
@Before
public void setUp() {
failures = spy(new Failures());
characters = new Characters();
characters.failures = failures;
caseInsensitiveComparisonStrategy = new ComparatorBasedComparisonStrategy(CaseInsensitiveCharacterComparator.instance);
charactersWithCaseInsensitiveComparisonStrategy = new Characters(caseInsensitiveComparisonStrategy);
charactersWithCaseInsensitiveComparisonStrategy.failures = failures;
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy 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;
}
use of org.assertj.core.internal.ComparatorBasedComparisonStrategy 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.internal.ComparatorBasedComparisonStrategy in project assertj-core by joel-costigliola.
the class IterableAssert_usingComparatorForType_Test method verify_internal_effects.
@Override
protected void verify_internal_effects() {
Iterables iterables = getIterables(assertions);
assertThat(iterables).isNotSameAs(iterablesBefore);
assertThat(iterables.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
ComparatorBasedComparisonStrategy strategy = (ComparatorBasedComparisonStrategy) iterables.getComparisonStrategy();
assertThat(strategy.getComparator()).isInstanceOf(ExtendedByTypesComparator.class);
}
Aggregations