Class FakeRequestFactory
java.lang.Object
com.google.web.bindery.requestfactory.shared.testing.FakeRequestFactory
- All Implemented Interfaces:
RequestFactory
A no-op implementation of
RequestFactory that can be used for
building mocks.-
Field Summary
Fields inherited from interface com.google.web.bindery.requestfactory.shared.RequestFactory
JSON_CONTENT_TYPE_UTF8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<P extends EntityProxy>
Request<P>find(EntityProxyId<P> proxyId) Returnsnull.Returns the last value passed toinitialize(EventBus, RequestTransport).getHistoryToken(EntityProxyId<?> proxy) Returnsnull.getHistoryToken(Class<? extends EntityProxy> clazz) Returnsnull.Class<? extends EntityProxy>getProxyClass(String historyToken) Returnsnull.<T extends EntityProxy>
EntityProxyId<T>getProxyId(String historyToken) Returnsnull.Returns the last value passed toinitialize(EventBus, RequestTransport).getSerializer(ProxyStore store) Returnsnull.voidinitialize(EventBus eventBus) Equivalent toinitialize(eventBus, new FakeRequestTransport()).voidinitialize(EventBus eventBus, RequestTransport transport) Saves the parameters for later retrieval.
-
Constructor Details
-
FakeRequestFactory
public FakeRequestFactory()
-
-
Method Details
-
getEventBus
Returns the last value passed toinitialize(EventBus, RequestTransport).- Specified by:
getEventBusin interfaceRequestFactory- Returns:
- the
EventBusassociated with this instance
-
getHistoryToken
Returnsnull.- Specified by:
getHistoryTokenin interfaceRequestFactory- Parameters:
clazz- a Class object for anEntityProxysubclass- Returns:
- a
Historycompatible token
-
getProxyClass
Returnsnull.- Specified by:
getProxyClassin interfaceRequestFactory- Parameters:
historyToken- a String token- Returns:
- a Class object for an
EntityProxysubclass
-
getProxyId
Returnsnull.- Specified by:
getProxyIdin interfaceRequestFactory- Parameters:
historyToken- a String token- Returns:
- an
EntityProxyId
-
getRequestTransport
Returns the last value passed toinitialize(EventBus, RequestTransport).- Specified by:
getRequestTransportin interfaceRequestFactory- Returns:
- the
RequestTransportassociated with this instance