org.truth0.subjects
Class AbstractArraySubject<T>

java.lang.Object
  extended by org.truth0.subjects.Subject<AbstractArraySubject<T>,T>
      extended by org.truth0.subjects.AbstractArraySubject<T>
Direct Known Subclasses:
ObjectArraySubject, PrimitiveBooleanArraySubject, PrimitiveCharArraySubject, PrimitiveDoubleArraySubject, PrimitiveFloatArraySubject, PrimitiveIntArraySubject, PrimitiveLongArraySubject

public abstract class AbstractArraySubject<T>
extends Subject<AbstractArraySubject<T>,T>

A common supertype for Array subjects, abstracting some common display and error infrastructure.

Author:
Christian Gruber (cgruber@israfil.net)

Field Summary
 
Fields inherited from class org.truth0.subjects.Subject
failureStrategy
 
Constructor Summary
AbstractArraySubject(FailureStrategy failureStrategy, T subject)
           
 
Method Summary
protected  void failWithBadType(Object expected)
           
protected  String getDisplaySubject()
           
protected abstract  List<?> listRepresentation()
           
protected abstract  String underlyingType()
           
 
Methods inherited from class org.truth0.subjects.Subject
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hashCode, internalCustomName, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, labeled, named
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractArraySubject

public AbstractArraySubject(FailureStrategy failureStrategy,
                            T subject)
Method Detail

underlyingType

protected abstract String underlyingType()

listRepresentation

protected abstract List<?> listRepresentation()

getDisplaySubject

protected String getDisplaySubject()
Overrides:
getDisplaySubject in class Subject<AbstractArraySubject<T>,T>

failWithBadType

protected void failWithBadType(Object expected)


Copyright © 2014. All rights reserved.