org.truth0.subjects
Class Subject<S extends Subject<S,T>,T>
java.lang.Object
org.truth0.subjects.Subject<S,T>
- Direct Known Subclasses:
- BooleanSubject, ClassSubject, DefaultSubject, IntegerSubject, IterableSubject, MapSubject, StringSubject
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)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
failureStrategy
protected final FailureStrategy failureStrategy
Subject
public Subject(FailureStrategy failureStrategy,
T subject)
is
public void is(T other)
isNull
public void isNull()
isNotNull
public void isNotNull()
isEqualTo
public void isEqualTo(Object other)
isNotEqualTo
public void isNotEqualTo(Object other)
getSubject
protected T getSubject()
check
protected TestVerb check()
fail
protected void fail(String verb,
Object... messageParts)
- Assembles a failure message and passes such to the FailureStrategy
- Parameters:
verb - the act being assertedmessageParts - the expectations against which the subject is compared
failWithBadResults
protected void failWithBadResults(String verb,
Object expected,
String failVerb,
Object actual)
- Assembles a failure message and passes such to the FailureStrategy
- Parameters:
verb - the act being assertedmessageParts - the expectations against which the subject is compared
failWithoutSubject
protected void failWithoutSubject(String verb)
Copyright © 2013. All Rights Reserved.