@Beta @GwtIncompatible public final class ForwardingWrapperTester extends Object
For example:
new ForwardingWrapperTester().testForwarding(Foo.class, new Function<Foo, Foo>() {
public Foo apply(Foo foo) {
return new ForwardingFoo(foo);
}
});
Constructor and Description |
---|
ForwardingWrapperTester() |
Modifier and Type | Method and Description |
---|---|
ForwardingWrapperTester |
includingEquals()
Asks for
Object.equals(java.lang.Object) and Object.hashCode() to be tested. |
<T> void |
testForwarding(Class<T> interfaceType,
com.google.common.base.Function<? super T,? extends T> wrapperFunction)
Tests that the forwarding wrapper returned by
wrapperFunction properly forwards
method calls with parameters passed as is, return value returned as is, and exceptions
propagated as is. |
public ForwardingWrapperTester includingEquals()
Object.equals(java.lang.Object)
and Object.hashCode()
to be tested.
That is, forwarding wrappers of equal instances should be equal.public <T> void testForwarding(Class<T> interfaceType, com.google.common.base.Function<? super T,? extends T> wrapperFunction)
wrapperFunction
properly forwards
method calls with parameters passed as is, return value returned as is, and exceptions
propagated as is.Copyright © 2010-2016. All Rights Reserved.