org.fest.assertions.error
Class ShouldBeSorted

java.lang.Object
  extended by org.fest.assertions.error.BasicErrorMessageFactory
      extended by org.fest.assertions.error.ShouldBeSorted
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldBeSorted
extends BasicErrorMessageFactory

Creates an error message indicating that an assertion that verifies a group of elements is sorted failed.
A group of elements can be a collection or an array.

Author:
Joel Costigliola

Method Summary
static ErrorMessageFactory shouldBeSorted(int i, Object group)
          Creates a new ShouldBeSorted.
static ErrorMessageFactory shouldBeSortedAccordingToGivenComparator(int i, Object group, Comparator<?> comparator)
           
static ErrorMessageFactory shouldHaveComparableElementsAccordingToGivenComparator(Object actual, Comparator<?> comparator)
           
static ErrorMessageFactory shouldHaveMutuallyComparableElements(Object actual)
           
 
Methods inherited from class org.fest.assertions.error.BasicErrorMessageFactory
create, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

shouldBeSorted

public static ErrorMessageFactory shouldBeSorted(int i,
                                                 Object group)
Creates a new ShouldBeSorted.

Parameters:
i - the index of elements whose not naturally ordered with the next.
group - the actual group in the failed assertion (either collection or an array).
Returns:
an instance of ErrorMessageFactory.

shouldBeSortedAccordingToGivenComparator

public static ErrorMessageFactory shouldBeSortedAccordingToGivenComparator(int i,
                                                                           Object group,
                                                                           Comparator<?> comparator)

shouldHaveMutuallyComparableElements

public static ErrorMessageFactory shouldHaveMutuallyComparableElements(Object actual)

shouldHaveComparableElementsAccordingToGivenComparator

public static ErrorMessageFactory shouldHaveComparableElementsAccordingToGivenComparator(Object actual,
                                                                                         Comparator<?> comparator)


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.