Package org.assertj.core.internal

Examples of org.assertj.core.internal.ComparatorBasedComparisonStrategy


  }

  @Override
  public S usingComparator(Comparator<? super Date> customComparator) {
    super.usingComparator(customComparator);
    this.dates = new Dates(new ComparatorBasedComparisonStrategy(customComparator));
    return myself;
  }
View Full Code Here


  }

  @Override
  public S usingComparator(Comparator<? super Integer> customComparator) {
    super.usingComparator(customComparator);
    integers = new Integers(new ComparatorBasedComparisonStrategy(customComparator));
    return myself;
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public S usingElementComparator(Comparator<? super T> elementComparator) {
  this.iterables = new Iterables(new ComparatorBasedComparisonStrategy(elementComparator));
  // to have the same semantics on base assertions like isEqualTo, we need to use an iterable comparator comparing
  // elements with elementComparator parameter
  objects = new Objects(new IterableElementComparisonStrategy<T>(elementComparator));
  return myself;
  }
View Full Code Here

  @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(OnFieldsComparator.class);
  assertThat(((OnFieldsComparator)strategy.getComparator()).getFields()).containsOnly("field");
  }
View Full Code Here

  }

  @Override
  public S usingComparator(Comparator<? super A> customComparator) {
    super.usingComparator(customComparator);
    this.strings = new Strings(new ComparatorBasedComparisonStrategy(customComparator));
    return myself;
  }
View Full Code Here

  }

  @Override
  public S usingComparator(Comparator<? super BigDecimal> customComparator) {
    super.usingComparator(customComparator);
    this.bigDecimals = new BigDecimals(new ComparatorBasedComparisonStrategy(customComparator));
    return myself;
  }
View Full Code Here

    return myself;
  }

  @Override
  public S usingElementComparator(Comparator<? super T> customComparator) {
    this.arrays = new ObjectArrays(new ComparatorBasedComparisonStrategy(customComparator));
    return myself;
  }
View Full Code Here

TOP

Related Classes of org.assertj.core.internal.ComparatorBasedComparisonStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.