Package org.assertj.core.internal

Examples of org.assertj.core.internal.Lists


  protected Lists lists;

  @Before
  public void setUp() {
    failures = spy(new Failures());
    lists = new Lists();
    lists.failures = failures;
    comparisonStrategy = new ComparatorBasedComparisonStrategy(CaseInsensitiveStringComparator.instance);
    listsWithCaseInsensitiveComparisonStrategy = new Lists(comparisonStrategy);
    listsWithCaseInsensitiveComparisonStrategy.failures = failures;
  }
View Full Code Here


  return assertions.usingFieldByFieldElementComparator();
  }

  @Override
  protected void verify_internal_effects() {
  Lists lists = getLists(assertions);
  Iterables iterables = getIterables(assertions);
  assertThat(lists).isNotSameAs(listsBefore);
  assertThat(iterables).isNotSameAs(iterablesBefore);
  assertThat(iterables.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
  assertThat(lists.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
  Comparator<?> listsElementComparator = ((ComparatorBasedComparisonStrategy) lists.getComparisonStrategy()).getComparator();
  assertThat(listsElementComparator).isInstanceOf(FieldByFieldComparator.class);
  Comparator<?> iterablesElementComparator = ((ComparatorBasedComparisonStrategy) iterables.getComparisonStrategy()).getComparator();
  assertThat(iterablesElementComparator).isInstanceOf(FieldByFieldComparator.class);
  }
View Full Code Here

  return assertions.usingElementComparatorOnFields("field");
  }

  @Override
  protected void verify_internal_effects() {
  Lists lists = getLists(assertions);
  Iterables iterables = getIterables(assertions);
  assertThat(lists).isNotSameAs(listsBefore);
  assertThat(iterables).isNotSameAs(iterablesBefore);
  assertThat(iterables.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
  assertThat(lists.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
  Comparator<?> listsElementComparator = ((ComparatorBasedComparisonStrategy) lists.getComparisonStrategy()).getComparator();
  assertThat(listsElementComparator).isInstanceOf(OnFieldsComparator.class);
  assertThat(((OnFieldsComparator) listsElementComparator).getFields()).containsOnly("field");
  Comparator<?> iterablesElementComparator = ((ComparatorBasedComparisonStrategy) iterables.getComparisonStrategy()).getComparator();
  assertThat(iterablesElementComparator).isInstanceOf(OnFieldsComparator.class);
  assertThat(((OnFieldsComparator) iterablesElementComparator).getFields()).containsOnly("field");
View Full Code Here

  return assertions.usingElementComparatorIgnoringFields("field");
  }

  @Override
  protected void verify_internal_effects() {
  Lists lists = getLists(assertions);
  Iterables iterables = getIterables(assertions);
  assertThat(lists).isNotSameAs(listsBefore);
  assertThat(iterables).isNotSameAs(iterablesBefore);
  assertThat(iterables.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
  assertThat(lists.getComparisonStrategy()).isInstanceOf(ComparatorBasedComparisonStrategy.class);
  Comparator<?> listsElementComparator = ((ComparatorBasedComparisonStrategy) lists.getComparisonStrategy()).getComparator();
  assertThat(listsElementComparator).isInstanceOf(IgnoringFieldsComparator.class);
  assertThat(((IgnoringFieldsComparator) listsElementComparator).getFields()).containsOnly("field");
  Comparator<?> iterablesElementComparator = ((ComparatorBasedComparisonStrategy) iterables.getComparisonStrategy()).getComparator();
  assertThat(iterablesElementComparator).isInstanceOf(IgnoringFieldsComparator.class);
  assertThat(((IgnoringFieldsComparator) iterablesElementComparator).getFields()).containsOnly("field");
View Full Code Here

TOP

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

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.