Package | Description |
---|---|
com.google.common.testing |
This package contains testing utilities.
|
Modifier and Type | Method and Description |
---|---|
<T> ClassSanityTester |
ClassSanityTester.setDefault(Class<T> type,
T value)
Sets the default value for
type . |
<T> ClassSanityTester |
ClassSanityTester.setDistinctValues(Class<T> type,
T value1,
T value2)
Sets distinct values for
type , so that when a class Foo is tested for Object.equals(java.lang.Object) and Object.hashCode() , and its construction requires a parameter of type , the distinct values of type can be passed as parameters to create Foo
instances that are unequal. |
<T> ClassSanityTester |
ClassSanityTester.setSampleInstances(Class<T> type,
Iterable<? extends T> instances)
Deprecated.
To supply multiple values, use
setDistinctValues(java.lang.Class<T>, T, T) . It accepts only two
values, which is enough for any equals testing. To supply a single value, use
setDefault(java.lang.Class<T>, T) . This method will be removed in Guava release 20.0. |
Copyright © 2010-2015. All Rights Reserved.