Class MockDelegate<S>
java.lang.Object
org.gcube.common.clients.delegates.MockDelegate<S>
- Type Parameters:
S- the type of service endpoint stubs used byCalls
- All Implemented Interfaces:
ProxyDelegate<S>
A
ProxyDelegate for mock testing.- Author:
- Fabio Simeoni
-
Method Summary
Modifier and TypeMethodDescriptionProxyConfig<?,S> config()Returns the configuration of the proxy.<V> VMakes aCallto a given service endpoint.static <S> ProxyDelegate<S>mockDelegate(ProxyPlugin<?, S, ?> plugin, S endpoint) Creates an instance with aProxyPluginand a mock endpoints.
-
Method Details
-
mockDelegate
Creates an instance with aProxyPluginand a mock endpoints.- Type Parameters:
S- the type of service endpoint stubs- Parameters:
plugin- the pluginendpoint- the endpoint- Returns:
- the delegate
-
make
Description copied from interface:ProxyDelegateMakes aCallto a given service endpoint.- Specified by:
makein interfaceProxyDelegate<S>- Type Parameters:
V- the type of the value returned from the call- Parameters:
call- the call- Returns:
- the value returned from the call
- Throws:
Exception- if the call fails
-
config
Description copied from interface:ProxyDelegateReturns the configuration of the proxy.- Specified by:
configin interfaceProxyDelegate<S>- Returns:
- the configuration
-