org.truth0.subjects
Class PrimitiveBooleanArraySubject

java.lang.Object
  extended by org.truth0.subjects.Subject<org.truth0.subjects.AbstractArraySubject<T>,T>
      extended by org.truth0.subjects.PrimitiveBooleanArraySubject

@GwtCompatible
public class PrimitiveBooleanArraySubject
extends Subject<org.truth0.subjects.AbstractArraySubject<T>,T>

A Subject to handle testing propositions for boolean[].

Author:
Christian Gruber (cgruber@israfil.net)

Field Summary
 
Fields inherited from class org.truth0.subjects.Subject
failureStrategy
 
Constructor Summary
PrimitiveBooleanArraySubject(FailureStrategy failureStrategy, boolean[] o)
           
 
Method Summary
 ListSubject<?,Boolean,List<Boolean>> asList()
           
protected  void failWithBadType(Object expected)
           
protected  String getDisplaySubject()
           
 void isEqualTo(Object expected)
          A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
 void isNotEqualTo(Object expected)
           
protected  List<Boolean> listRepresentation()
           
protected  String underlyingType()
           
 
Methods inherited from class org.truth0.subjects.Subject
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hashCode, internalCustomName, is, isA, isNotA, isNotNull, isNull, labeled, named
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimitiveBooleanArraySubject

public PrimitiveBooleanArraySubject(FailureStrategy failureStrategy,
                                    boolean[] o)
Method Detail

underlyingType

protected String underlyingType()

listRepresentation

protected List<Boolean> listRepresentation()

isEqualTo

public void isEqualTo(Object expected)
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.

Overrides:
isEqualTo in class Subject<org.truth0.subjects.AbstractArraySubject<boolean[]>,boolean[]>

isNotEqualTo

public void isNotEqualTo(Object expected)
Overrides:
isNotEqualTo in class Subject<org.truth0.subjects.AbstractArraySubject<boolean[]>,boolean[]>

asList

public ListSubject<?,Boolean,List<Boolean>> asList()

getDisplaySubject

protected String getDisplaySubject()
Overrides:
getDisplaySubject in class Subject<org.truth0.subjects.AbstractArraySubject<T>,T>

failWithBadType

protected void failWithBadType(Object expected)


Copyright © 2014. All rights reserved.