public class HashCodeAndEqualsMockWrapper extends Object
It doesn't use the actual mock Object.hashCode()
and Object.equals(java.lang.Object)
method as they might
throw an NPE if those method cannot be stubbed even internally.
Instead the strategy is :
System.identityHashCode(java.lang.Object)
HashCodeAndEqualsSafeSet
Constructor and Description |
---|
HashCodeAndEqualsMockWrapper(Object mockInstance) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
get() |
int |
hashCode() |
static HashCodeAndEqualsMockWrapper |
of(Object mock) |
String |
toString() |
public HashCodeAndEqualsMockWrapper(Object mockInstance)
public Object get()
public static HashCodeAndEqualsMockWrapper of(Object mock)
Copyright © 2018. All rights reserved.