org.junit.contrib.truth.subjects
Class IterableSubject<S extends IterableSubject<S,T,C>,T,C extends Iterable<T>>

java.lang.Object
  extended by org.junit.contrib.truth.subjects.Subject<S,C>
      extended by org.junit.contrib.truth.subjects.IterableSubject<S,T,C>
Direct Known Subclasses:
CollectionSubject

@GwtCompatible
public class IterableSubject<S extends IterableSubject<S,T,C>,T,C extends Iterable<T>>
extends Subject<S,C>

Author:
Kevin Bourrillion

Nested Class Summary
 
Nested classes/interfaces inherited from class org.junit.contrib.truth.subjects.Subject
Subject.And<C>
 
Constructor Summary
protected IterableSubject(FailureStrategy failureStrategy, C list)
           
 
Method Summary
 Subject.And<S> contains(Object item)
           
static
<T,C extends Iterable<T>>
IterableSubject<? extends IterableSubject<?,T,C>,T,C>
create(FailureStrategy failureStrategy, Iterable<T> list)
           
 Subject.And<S> hasContentsAnyOrder(Object... expected)
           
 Subject.And<S> hasContentsInOrder(Object... expected)
           
 Subject.And<S> isEmpty()
          Attests that a Collection contains the provided object or fails.
 
Methods inherited from class org.junit.contrib.truth.subjects.Subject
check, fail, failWithoutSubject, getSubject, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, nextChain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableSubject

protected IterableSubject(FailureStrategy failureStrategy,
                          C list)
Method Detail

create

public static <T,C extends Iterable<T>> IterableSubject<? extends IterableSubject<?,T,C>,T,C> create(FailureStrategy failureStrategy,
                                                                                                     Iterable<T> list)

contains

public Subject.And<S> contains(Object item)

isEmpty

public Subject.And<S> isEmpty()
Attests that a Collection contains the provided object or fails.


hasContentsInOrder

public Subject.And<S> hasContentsInOrder(Object... expected)

hasContentsAnyOrder

public Subject.And<S> hasContentsAnyOrder(Object... expected)


Copyright © 2014. All Rights Reserved.