|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.testing.ClassSanityTester.FactoryMethodReturnValueTester
public final class ClassSanityTester.FactoryMethodReturnValueTester
Runs sanity tests against return values of static factory methods declared by a class.
| Method Summary | |
|---|---|
ClassSanityTester.FactoryMethodReturnValueTester |
testEquals()
Tests Object.equals(java.lang.Object) and Object.hashCode() against the return values of the
static methods, by asserting that when equal parameters are passed to the same static method,
the return value should also be equal; and vice versa. |
ClassSanityTester.FactoryMethodReturnValueTester |
testEqualsAndSerializable()
Runs equals and serialization test on the return values. |
ClassSanityTester.FactoryMethodReturnValueTester |
testNulls()
Tests null checks against the instance methods of the return values, if any. |
ClassSanityTester.FactoryMethodReturnValueTester |
testSerializable()
Runs serialization test on the return values of the static methods. |
ClassSanityTester.FactoryMethodReturnValueTester |
thatReturn(Class<?> returnType)
Specifies that only the methods that are declared to return returnType or its subtype
are tested. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ClassSanityTester.FactoryMethodReturnValueTester thatReturn(Class<?> returnType)
returnType or its subtype
are tested.
public ClassSanityTester.FactoryMethodReturnValueTester testNulls()
throws Exception
Test fails if default value cannot be determined for a constructor or factory method parameter, or if the constructor or factory method throws exception.
Exception
public ClassSanityTester.FactoryMethodReturnValueTester testEquals()
throws Exception
Object.equals(java.lang.Object) and Object.hashCode() against the return values of the
static methods, by asserting that when equal parameters are passed to the same static method,
the return value should also be equal; and vice versa.
Test fails if default value cannot be determined for a constructor or factory method parameter, or if the constructor or factory method throws exception.
Exception
public ClassSanityTester.FactoryMethodReturnValueTester testSerializable()
throws Exception
Test fails if default value cannot be determined for a constructor or factory method parameter, or if the constructor or factory method throws exception.
Exception
public ClassSanityTester.FactoryMethodReturnValueTester testEqualsAndSerializable()
throws Exception
Test fails if default value cannot be determined for a constructor or factory method parameter, or if the constructor or factory method throws exception.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||