Package org.fest.assertions.util

Examples of org.fest.assertions.util.ArrayWrapperList


    return false;
  }

  void assertDoesNotHaveDuplicates(Description description, Object array) {
    assertNotNull(description, array);
    ArrayWrapperList wrapped = wrap(array);
    Collection<?> duplicates = duplicatesFrom(wrapped);
    if (duplicates == null || duplicates.isEmpty()) {
      return;
    }
    throw failures.failure(description, shouldNotHaveDuplicates(array, duplicates));
View Full Code Here


  }

  @Test
  public void should_fail_if_actual_has_duplicates() {
    short[] actual = { 2, 4, 6, 8, 6, 8 };
    ArrayWrapperList wrapped = ArrayWrapperList.wrap(actual);
    Collection<Object> duplicates = duplicatesFrom(wrapped);
    try {
      arrays.assertDoesNotHaveDuplicates(description, actual);
    } catch (AssertionError e) {
      verify(failures).failure(description, shouldNotHaveDuplicates(actual, duplicates));
View Full Code Here

  }

  @Test
  public void should_fail_if_actual_has_duplicates() {
    float[] actual = { 1f, 2f, 2f, 3f, 2f, 4f };
    ArrayWrapperList wrapped = wrap(actual);
    Collection<Object> duplicates = duplicatesFrom(wrapped);
    try {
      arrays.assertDoesNotHaveDuplicates(description, actual);
    } catch (AssertionError e) {
      verify(failures).failure(description, shouldNotHaveDuplicates(actual, duplicates));
View Full Code Here

  }

  @Test
  public void should_fail_if_actual_has_duplicates() {
    byte[] actual = { (byte) 2, (byte) 4, (byte) 6, (byte) 8, (byte) 6, (byte) 8 };
    ArrayWrapperList wrapped = ArrayWrapperList.wrap(actual);
    Collection<Object> duplicates = duplicatesFrom(wrapped);
    try {
      arrays.assertDoesNotHaveDuplicates(description, actual);
    } catch (AssertionError e) {
      verify(failures).failure(description, shouldNotHaveDuplicates(actual, duplicates));
View Full Code Here

  }

  @Test
  public void should_fail_if_actual_has_duplicates() {
    int[] actual = { 1, 2, 2, 3, 2, 4 };
    ArrayWrapperList wrapped = wrap(actual);
    Collection<Object> duplicates = duplicatesFrom(wrapped);
    try {
      arrays.assertDoesNotHaveDuplicates(description, actual);
    } catch (AssertionError e) {
      verify(failures).failure(description, shouldNotHaveDuplicates(actual, duplicates));
View Full Code Here

  }

  @Test
  public void should_fail_if_actual_has_duplicates() {
    double[] actual = { 1d, 2d, 2d, 3d, 2d, 4d };
    ArrayWrapperList wrapped = wrap(actual);
    Collection<Object> duplicates = duplicatesFrom(wrapped);
    try {
      arrays.assertDoesNotHaveDuplicates(description, actual);
    } catch (AssertionError e) {
      verify(failures).failure(description, shouldNotHaveDuplicates(actual, duplicates));
View Full Code Here

  }

  @Test
  public void should_fail_if_actual_has_duplicates() {
    long[] actual = { 1, 2, 2, 3, 2, 4 };
    ArrayWrapperList wrapped = wrap(actual);
    Collection<Object> duplicates = duplicatesFrom(wrapped);
    try {
      arrays.assertDoesNotHaveDuplicates(description, actual);
    } catch (AssertionError e) {
      verify(failures).failure(description, shouldNotHaveDuplicates(actual, duplicates));
View Full Code Here

TOP

Related Classes of org.fest.assertions.util.ArrayWrapperList

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.