Interface ObjectContract<T>
- Type Parameters:
T
- The type being tested.
- All Superinterfaces:
ContractSupport<T>
,EqualsContract<T>
,HashCodeContract<T>
,ProviderSupport<T>
,SupportedMethods
,ToStringContract<T>
- All Known Subinterfaces:
CollectionContract<E,
,C> IterableContract<E,
,I> ListContract<E,
,L> SequencedCollectionContract<E,
,C> WithString
public interface ObjectContract<T>
extends EqualsContract<T>, HashCodeContract<T>, ToStringContract<T>
This interface tests if a class has implemented the Object
interface as specified in Object
. The following
table lists the methods that are tested by this contract interface and the methods that are not tested.
Tested | Not Tested |
---|---|
equals | getClass |
hashCode | clone |
toString | notify |
notifyAll | |
wait | |
finalize |
This interface is a mix-in class that can be used by a test class to test the implementation if the Object
interface specification:
public class MyClassTest extends ObjectContract<MyClass> {
}
- Since:
- 1.0
- Author:
- evanbergstrom
- See Also:
-
Method Summary
Methods inherited from interface org.soliscode.test.contract.object.EqualsContract
testEqualsForNullValue, testEqualsIsConsistent, testEqualsIsReflexive, testEqualsIsSymmetric, testEqualsIsTransitive
Methods inherited from interface org.soliscode.test.contract.object.HashCodeContract
testHashCodeDistribution, testHashCodeIsStable, testHashCodeWithEqualValues, testHashDifferentValues
Methods inherited from interface org.soliscode.test.contract.support.ProviderSupport
provider
Methods inherited from interface org.soliscode.test.SupportedMethods
supportsMethod
Methods inherited from interface org.soliscode.test.contract.object.ToStringContract
testToStringForDifferentValues, testToStringForEqualValues, testToStringIsConsistent, testToStringOverridden