org.junit.contrib.truth.subjects
Class Subject<S extends Subject<S,T>,T>
java.lang.Object
org.junit.contrib.truth.subjects.Subject<S,T>
- Direct Known Subclasses:
- BooleanSubject, DefaultSubject, IntegerSubject, IterableSubject, StringSubject
@GwtCompatible(emulated=true)
public class Subject<S extends Subject<S,T>,T>
- extends Object
Propositions for arbitrarily typed subjects and for properties
of Object
- Author:
- David Saff, Christian Gruber (cgruber@israfil.net)
Nested Class Summary |
static interface |
Subject.And<C>
A convenience class to allow for chaining in the fluent API
style, such that subjects can make propositions in series. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Subject
public Subject(FailureStrategy failureStrategy,
T subject)
nextChain
protected final Subject.And<S> nextChain()
- A method which wraps the current Subject concrete
subtype in a chaining "And" object.
is
public Subject.And<S> is(T other)
isNull
public Subject.And<S> isNull()
isNotNull
public Subject.And<S> isNotNull()
isEqualTo
public Subject.And<S> isEqualTo(Object other)
isNotEqualTo
public Subject.And<S> isNotEqualTo(Object other)
isA
@GwtIncompatible(value="Class.isInstance")
public Subject.And<S> isA(Class<?> clazz)
isNotA
@GwtIncompatible(value="Class.isInstance")
public Subject.And<S> isNotA(Class<?> clazz)
getSubject
protected T getSubject()
check
protected TestVerb check()
fail
protected void fail(String verb,
Object... messageParts)
failWithoutSubject
protected void failWithoutSubject(String verb)
Copyright © 2014. All Rights Reserved.