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
-
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
.void
initialize
(EventBus eventBus) Equivalent toinitialize(eventBus, new FakeRequestTransport())
.void
initialize
(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:
getEventBus
in interfaceRequestFactory
- Returns:
- the
EventBus
associated with this instance
-
getHistoryToken
Returnsnull
.- Specified by:
getHistoryToken
in interfaceRequestFactory
- Parameters:
clazz
- a Class object for anEntityProxy
subclass- Returns:
- a
History
compatible token
-
getProxyClass
Returnsnull
.- Specified by:
getProxyClass
in interfaceRequestFactory
- Parameters:
historyToken
- a String token- Returns:
- a Class object for an
EntityProxy
subclass
-
getProxyId
Returnsnull
.- Specified by:
getProxyId
in interfaceRequestFactory
- Parameters:
historyToken
- a String token- Returns:
- an
EntityProxyId
-
getRequestTransport
Returns the last value passed toinitialize(EventBus, RequestTransport)
.- Specified by:
getRequestTransport
in interfaceRequestFactory
- Returns:
- the
RequestTransport
associated with this instance