com.google.common.truth
Class AbstractArraySubject<S extends AbstractArraySubject<S,T>,T>

java.lang.Object
  extended by com.google.common.truth.Subject<AbstractArraySubject<S,T>,T>
      extended by com.google.common.truth.AbstractArraySubject<S,T>
Direct Known Subclasses:
ObjectArraySubject, PrimitiveBooleanArraySubject, PrimitiveCharArraySubject, PrimitiveDoubleArraySubject, PrimitiveFloatArraySubject, PrimitiveIntArraySubject, PrimitiveLongArraySubject

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

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

Author:
Christian Gruber ([email protected])

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
 
Field Summary
 
Fields inherited from class com.google.common.truth.Subject
failureStrategy
 
Constructor Summary
AbstractArraySubject(FailureStrategy failureStrategy, T subject)
           
 
Method Summary
protected  void failWithBadType(Object expected)
           
protected  String getDisplaySubject()
           
protected abstract  List<?> listRepresentation()
           
 S named(String name)
          Renames the subject so that this name appears in the error messages in place of string representations of the subject.
protected abstract  String underlyingType()
           
 
Methods inherited from class com.google.common.truth.Subject
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, labeled
 
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

named

public S named(String name)
Description copied from class: Subject
Renames the subject so that this name appears in the error messages in place of string representations of the subject.

Overrides:
named in class Subject<AbstractArraySubject<S extends AbstractArraySubject<S,T>,T>,T>

underlyingType

protected abstract String underlyingType()

listRepresentation

protected abstract List<?> listRepresentation()

getDisplaySubject

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

failWithBadType

protected void failWithBadType(Object expected)


Copyright © 2014. All rights reserved.